Commit e4e5605
Merge bitcoin#30552: test: fix constructor of msg_tx
ec5e294 test: fix constructor of msg_tx (Martin Zumsande)
Pull request description:
In python, if the default value is a mutable object (here: a class) it is shared over all instances, so that one instance being changed would affect others to be changed as well.
This was the source of bitcoin#30543, and possibly various other intermittent bugs in the functional tests, see
bitcoin#29621 (comment).
Fixes bitcoin#30543
Fixes bitcoin#29621
Fixes bitcoin#25128
ACKs for top commit:
sipa:
utACK ec5e294. I believe some linters even warn about doing this.
maflcko:
ACK ec5e294
vasild:
ACK ec5e294 ❤️
theStack:
ACK ec5e294
Tree-SHA512: a6204fb1a326de3f9aa965f345fd658f6a4dcf78731db25cc905ff6eb8d4eeb65d14cc316305eebd89387aec8748c57c3a4f4ca62408f8e5ee53f535b88b14111 parent df3c239 commit e4e5605
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
1728 | | - | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1729 | 1732 | | |
1730 | 1733 | | |
1731 | 1734 | | |
| |||
0 commit comments