Commit a79b720
committed
Merge bitcoin/bitcoin#26295: Replace global g_cs_orphans lock with local
7082ce3 scripted-diff: rename and de-globalise g_cs_orphans (Anthony Towns)
733d85f Move all g_cs_orphans locking to txorphanage (Anthony Towns)
a936f41 txorphanage: make m_peer_work_set private (Anthony Towns)
3614819 txorphange: move orphan workset to txorphanage (Anthony Towns)
6f8e442 net_processing: Localise orphan_work_set handling to ProcessOrphanTx (Anthony Towns)
0027174 net_processing: move ProcessOrphanTx docs to declaration (Anthony Towns)
9910ed7 net_processing: Pass a Peer& to ProcessOrphanTx (Anthony Towns)
89e2e0d net_processing: move extra transactions to msgproc mutex (Anthony Towns)
ff8d44d Remove unnecessary includes of txorphange.h (Anthony Towns)
Pull request description:
Moves extra transactions to be under the `m_msgproc_mutex` lock rather than `g_cs_orphans` and refactors orphan handling so that the lock can be internal to the `TxOrphange` class.
ACKs for top commit:
dergoegge:
Code review ACK 7082ce3
glozow:
ACK 7082ce3 via code review and some [basic testing](https://github.com/glozow/bitcoin/blob/review-26295/src/test/orphanage_tests.cpp#L150). I think putting txorphanage in charge of handling peer work sets is the right direction.
Tree-SHA512: 1ec454c3a69ebd45ff652770d6a55c6b183db71aba4d12639ed70f525f0035e069a81d06e9b65b66e87929c607080a1c5e5dcd2ca91eaa2cf202dc6c02aa6818File tree
8 files changed
+126
-99
lines changed- src
- test
- fuzz
8 files changed
+126
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| |||
584 | 581 | | |
585 | 582 | | |
586 | 583 | | |
587 | | - | |
588 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
589 | 595 | | |
590 | 596 | | |
591 | 597 | | |
| |||
919 | 925 | | |
920 | 926 | | |
921 | 927 | | |
922 | | - | |
| 928 | + | |
923 | 929 | | |
924 | 930 | | |
925 | 931 | | |
926 | 932 | | |
927 | | - | |
| 933 | + | |
928 | 934 | | |
929 | | - | |
| 935 | + | |
930 | 936 | | |
931 | 937 | | |
932 | 938 | | |
| |||
1490 | 1496 | | |
1491 | 1497 | | |
1492 | 1498 | | |
1493 | | - | |
| 1499 | + | |
1494 | 1500 | | |
1495 | 1501 | | |
1496 | 1502 | | |
| |||
2880 | 2886 | | |
2881 | 2887 | | |
2882 | 2888 | | |
2883 | | - | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
| 2889 | + | |
2892 | 2890 | | |
| 2891 | + | |
2893 | 2892 | | |
2894 | | - | |
2895 | | - | |
2896 | | - | |
2897 | | - | |
2898 | | - | |
2899 | 2893 | | |
2900 | | - | |
2901 | | - | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
2902 | 2897 | | |
| 2898 | + | |
2903 | 2899 | | |
2904 | 2900 | | |
| 2901 | + | |
2905 | 2902 | | |
2906 | 2903 | | |
2907 | 2904 | | |
2908 | 2905 | | |
2909 | | - | |
| 2906 | + | |
2910 | 2907 | | |
2911 | 2908 | | |
2912 | 2909 | | |
| |||
2957 | 2954 | | |
2958 | 2955 | | |
2959 | 2956 | | |
| 2957 | + | |
| 2958 | + | |
2960 | 2959 | | |
2961 | 2960 | | |
2962 | 2961 | | |
| |||
3990 | 3989 | | |
3991 | 3990 | | |
3992 | 3991 | | |
3993 | | - | |
| 3992 | + | |
3994 | 3993 | | |
3995 | 3994 | | |
3996 | 3995 | | |
| |||
4031 | 4030 | | |
4032 | 4031 | | |
4033 | 4032 | | |
4034 | | - | |
| 4033 | + | |
4035 | 4034 | | |
4036 | 4035 | | |
4037 | 4036 | | |
| |||
4045 | 4044 | | |
4046 | 4045 | | |
4047 | 4046 | | |
4048 | | - | |
| 4047 | + | |
4049 | 4048 | | |
4050 | 4049 | | |
4051 | 4050 | | |
| |||
4226 | 4225 | | |
4227 | 4226 | | |
4228 | 4227 | | |
4229 | | - | |
| 4228 | + | |
4230 | 4229 | | |
4231 | 4230 | | |
4232 | 4231 | | |
| |||
4854 | 4853 | | |
4855 | 4854 | | |
4856 | 4855 | | |
| 4856 | + | |
4857 | 4857 | | |
4858 | | - | |
4859 | | - | |
4860 | | - | |
4861 | | - | |
| 4858 | + | |
| 4859 | + | |
4862 | 4860 | | |
4863 | 4861 | | |
4864 | 4862 | | |
4865 | 4863 | | |
4866 | 4864 | | |
| 4865 | + | |
| 4866 | + | |
4867 | 4867 | | |
4868 | 4868 | | |
4869 | 4869 | | |
4870 | 4870 | | |
4871 | 4871 | | |
4872 | 4872 | | |
4873 | 4873 | | |
4874 | | - | |
4875 | | - | |
4876 | | - | |
4877 | | - | |
4878 | | - | |
4879 | 4874 | | |
4880 | 4875 | | |
4881 | 4876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | | - | |
94 | 91 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
105 | | - | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | | - | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
140 | 138 | | |
141 | | - | |
| 139 | + | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
63 | | - | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
0 commit comments