Commit b99a163
MarcoFalke
Merge #19781: test: add parameterized constructor for msg_sendcmpct()
6384419 test: add parameterized constructor for msg_sendcmpct() (Sebastian Falbesoner)
Pull request description:
While working on the test for #19776 I noticed that creating a `sendcmpct` message is quite cumbersome -- due to the lack of a parameterized constructor, one needs to create an empty (that is, initialized with default values) object and then set the two fields one by one. This PR replaces the default constructor with a parameterized constructor and uses it in the test `p2p_compactblocks.py`, reducing LOC. No need to pollute the namespace with temporary throw-away message objects anymore.
ACKs for top commit:
guggero:
Code review ACK 6384419.
epson121:
Code review ACK 6384419
Tree-SHA512: 3b58d276d714b73abc6cc98d1d52dec5f6026b33f03faaeb7dcbc5d83ac377555179f98b159b2b9ecc8957999c35a1dc082e3c69299c5fde4e35f1bd0587ce9dFile tree
2 files changed
+10
-27
lines changed- test/functional
- test_framework
2 files changed
+10
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 191 | + | |
195 | 192 | | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
201 | | - | |
202 | | - | |
203 | | - | |
| 198 | + | |
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
208 | 203 | | |
209 | 204 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 205 | + | |
213 | 206 | | |
214 | 207 | | |
215 | 208 | | |
| |||
220 | 213 | | |
221 | 214 | | |
222 | 215 | | |
223 | | - | |
224 | | - | |
225 | | - | |
| 216 | + | |
226 | 217 | | |
227 | 218 | | |
228 | 219 | | |
229 | | - | |
230 | | - | |
231 | | - | |
| 220 | + | |
232 | 221 | | |
233 | 222 | | |
234 | 223 | | |
235 | 224 | | |
236 | 225 | | |
237 | | - | |
238 | | - | |
239 | | - | |
| 226 | + | |
240 | 227 | | |
241 | 228 | | |
242 | 229 | | |
| |||
729 | 716 | | |
730 | 717 | | |
731 | 718 | | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
| 719 | + | |
737 | 720 | | |
738 | 721 | | |
739 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
| |||
0 commit comments