diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-08-25 21:49:49 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-08-26 10:45:25 +0000 |
commit | 25dd86715039586d92176eee16e9c6644d2547f0 (patch) | |
tree | 933ff753d30eee49f9364df1b0daea9f8bff4a2e /test/functional/test_framework/messages.py | |
parent | e00ecb3d7aaee463643e486ca03c318e192b8058 (diff) |
Avoid using mutable default parameter values
Diffstat (limited to 'test/functional/test_framework/messages.py')
-rwxr-xr-x | test/functional/test_framework/messages.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 89a5a65e64..917efaa833 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -803,7 +803,9 @@ class HeaderAndShortIDs: return [ key0, key1 ] # Version 2 compact blocks use wtxid in shortids (rather than txid) - def initialize_from_block(self, block, nonce=0, prefill_list = [0], use_witness = False): + def initialize_from_block(self, block, nonce=0, prefill_list=None, use_witness=False): + if prefill_list is None: + prefill_list = [0] self.header = CBlockHeader(block) self.nonce = nonce self.prefilled_txn = [ PrefilledTransaction(i, block.vtx[i]) for i in prefill_list ] |