Commit 860f916
committed
Merge bitcoin#20524: test: Move MIN_VERSION_SUPPORTED to p2p.py
9f21ed4 [test] Check user agent string from test framework connections (John Newbery)
9ce4c3c [test] Add P2P_SERVICES to p2p.py (John Newbery)
0105426 [test] Move MY_RELAY to p2p.py (John Newbery)
9b4054c [test] Move MY_SUBVERSION to p2p.py (John Newbery)
7e158a6 [test] Move MY_VERSION to p2p.py (John Newbery)
6523111 [test] Move MIN_VERSION_SUPPORTED to p2p.py (John Newbery)
Pull request description:
The messages.py module should contain code and helpers for
[de]serializing p2p messages. Specific usage of those messages should
be in p2p.py. This PR moves test framework specific constants to p2p.py.
It also changes the SUBVERSION constant to be a string instead of a bytes object. That means that it needs to be explicitly converted to a bytes object to serialize into a version message. Failing to do so would cause an easy-to-spot bug. This should avoid silent failures like the one solved in bitcoin#20522.
ACKs for top commit:
laanwj:
Code review ACK 9f21ed4
Tree-SHA512: 41d46575ac0ec36ad074d6c6a5b9cef50b05eeb8ddd8ed0a8f0d0c4617cc7b8baa6580af5b83a668230ce1ac27bf0e56914d0361a48b1b05fd75e2e60350eeafFile tree
5 files changed
+61
-31
lines changed- test/functional
- test_framework
5 files changed
+61
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
219 | | - | |
| 225 | + | |
220 | 226 | | |
221 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
128 | | - | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
| |||
326 | 321 | | |
327 | 322 | | |
328 | 323 | | |
329 | | - | |
330 | 324 | | |
331 | 325 | | |
332 | 326 | | |
333 | | - | |
| 327 | + | |
334 | 328 | | |
335 | 329 | | |
336 | 330 | | |
337 | 331 | | |
338 | | - | |
| 332 | + | |
339 | 333 | | |
340 | 334 | | |
341 | 335 | | |
342 | 336 | | |
343 | | - | |
344 | | - | |
| 337 | + | |
345 | 338 | | |
346 | 339 | | |
347 | 340 | | |
| |||
1023 | 1016 | | |
1024 | 1017 | | |
1025 | 1018 | | |
1026 | | - | |
| 1019 | + | |
1027 | 1020 | | |
1028 | 1021 | | |
1029 | 1022 | | |
1030 | 1023 | | |
1031 | | - | |
1032 | | - | |
| 1024 | + | |
| 1025 | + | |
1033 | 1026 | | |
1034 | 1027 | | |
1035 | 1028 | | |
1036 | 1029 | | |
1037 | | - | |
| 1030 | + | |
1038 | 1031 | | |
1039 | | - | |
| 1032 | + | |
1040 | 1033 | | |
1041 | 1034 | | |
1042 | 1035 | | |
| |||
1055 | 1048 | | |
1056 | 1049 | | |
1057 | 1050 | | |
1058 | | - | |
| 1051 | + | |
1059 | 1052 | | |
1060 | | - | |
| 1053 | + | |
1061 | 1054 | | |
1062 | | - | |
| 1055 | + | |
1063 | 1056 | | |
1064 | 1057 | | |
1065 | 1058 | | |
| |||
1071 | 1064 | | |
1072 | 1065 | | |
1073 | 1066 | | |
1074 | | - | |
| 1067 | + | |
1075 | 1068 | | |
1076 | 1069 | | |
1077 | 1070 | | |
1078 | | - | |
| 1071 | + | |
1079 | 1072 | | |
1080 | 1073 | | |
1081 | | - | |
| 1074 | + | |
1082 | 1075 | | |
1083 | 1076 | | |
1084 | 1077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
| |||
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
330 | 344 | | |
331 | 345 | | |
332 | 346 | | |
333 | 347 | | |
334 | 348 | | |
335 | 349 | | |
336 | 350 | | |
337 | | - | |
| 351 | + | |
338 | 352 | | |
339 | 353 | | |
340 | 354 | | |
| |||
417 | 431 | | |
418 | 432 | | |
419 | 433 | | |
420 | | - | |
| 434 | + | |
421 | 435 | | |
422 | 436 | | |
423 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
548 | 554 | | |
549 | 555 | | |
550 | 556 | | |
| |||
572 | 578 | | |
573 | 579 | | |
574 | 580 | | |
575 | | - | |
| 581 | + | |
576 | 582 | | |
577 | 583 | | |
578 | 584 | | |
| |||
0 commit comments