mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-08 09:21:06 +02:00
test: Remove True argument to CBlock::serialize
Unnamed arguments are confusing as to what they mean without looking up
the function signature.
Since segwit is active by default in regtest, and all blocks are
serialized with witness (#15664, c459c5f
), remove the argument
`with_witness=True` from all calls to `CBlock::serialize` and
`BlockTransactions::serialize`.
This diff has been created with a script, but is better reviewed without
a scripted diff.
sed -i --regexp-extended -e 's/block(_?[2a-z]*)\.serialize\([a-z_]*=?True/block\1.serialize(/g' $(git grep -l serialize ./test)
This commit is contained in:
@ -108,7 +108,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
|
||||
witness and add_witness_commitment(block)
|
||||
block.rehash()
|
||||
block.solve()
|
||||
node.submitblock(block.serialize(True).hex())
|
||||
node.submitblock(block.serialize().hex())
|
||||
if (accept):
|
||||
assert_equal(node.getbestblockhash(), block.hash)
|
||||
self.tip = block.sha256
|
||||
|
Reference in New Issue
Block a user