mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-13 00:54:53 +01:00
Merge #12798: doc: Refer to witness reserved value as spec. in the BIP
adc2586 doc: Refer to witness reserved value as spec. in the BIP (MarcoFalke)
Pull request description:
BIP141 refers to the coinbase's input's witness that consists of a single 32-byte array as "witness reserved value".
This updates the code to follow the BIP
Tree-SHA512: 49c9463519bd11b9ff322eeecd638f7627aa8efdfb869f8549f9a160ff34281e1b5a0b9d83545a692de6f5ff795055292c423403b0f3ce7597e3f32273cf1deb
This commit is contained in:
@@ -425,7 +425,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
|
||||
assert(self.nodes[0].getbestblockhash() == block.hash)
|
||||
|
||||
# Now make sure that malleating the witness nonce doesn't
|
||||
# Now make sure that malleating the witness reserved value doesn't
|
||||
# result in a block permanently marked bad.
|
||||
block = self.build_next_block()
|
||||
add_witness_commitment(block)
|
||||
@@ -436,7 +436,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack = [ ser_uint256(1) ]
|
||||
test_witness_block(self.nodes[0].rpc, self.test_node, block, accepted=False)
|
||||
|
||||
# Changing the witness nonce doesn't change the block hash
|
||||
# Changing the witness reserved value doesn't change the block hash
|
||||
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack = [ ser_uint256(0) ]
|
||||
test_witness_block(self.nodes[0].rpc, self.test_node, block, accepted=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user