aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_block.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-07-03 16:37:00 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-06-18 20:58:03 +0200
commit222290f54388270937cb6c174195717e2214ec0d (patch)
treecedf5bf567380c242fcf2d3eea18dd67a5b08d90 /test/functional/feature_block.py
parentfac90c55be478f0323eafa1d560ea2c56f04fb23 (diff)
downloadbitcoin-222290f54388270937cb6c174195717e2214ec0d.tar.xz
test: Set BIP34Height = 2 for regtest
Diffstat (limited to 'test/functional/feature_block.py')
-rwxr-xr-xtest/functional/feature_block.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py
index 158efb52c9..d06f030022 100755
--- a/test/functional/feature_block.py
+++ b/test/functional/feature_block.py
@@ -373,7 +373,9 @@ class FullBlockTest(BitcoinTestFramework):
# b30 has a max-sized coinbase scriptSig.
self.move_tip(23)
b30 = self.next_block(30)
- b30.vtx[0].vin[0].scriptSig = b'\x00' * 100
+ b30.vtx[0].vin[0].scriptSig = bytes(b30.vtx[0].vin[0].scriptSig) # Convert CScript to raw bytes
+ b30.vtx[0].vin[0].scriptSig += b'\x00' * (100 - len(b30.vtx[0].vin[0].scriptSig)) # Fill with 0s
+ assert_equal(len(b30.vtx[0].vin[0].scriptSig), 100)
b30.vtx[0].rehash()
b30 = self.update_block(30, [])
self.send_blocks([b30], True)
@@ -817,6 +819,7 @@ class FullBlockTest(BitcoinTestFramework):
b61.vtx[0].rehash()
b61 = self.update_block(61, [])
assert_equal(duplicate_tx.serialize(), b61.vtx[0].serialize())
+ # BIP30 is always checked on regtest, regardless of the BIP34 activation height
self.send_blocks([b61], success=False, reject_reason='bad-txns-BIP30', reconnect=True)
# Test BIP30 (allow duplicate if spent)