aboutsummaryrefslogtreecommitdiff
path: root/test
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
parentfac90c55be478f0323eafa1d560ea2c56f04fb23 (diff)
downloadbitcoin-222290f54388270937cb6c174195717e2214ec0d.tar.xz
test: Set BIP34Height = 2 for regtest
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_block.py5
-rwxr-xr-xtest/functional/rpc_blockchain.py2
2 files changed, 5 insertions, 2 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)
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py
index 00324347ed..b3f0fc6e2e 100755
--- a/test/functional/rpc_blockchain.py
+++ b/test/functional/rpc_blockchain.py
@@ -129,7 +129,7 @@ class BlockchainTest(BitcoinTestFramework):
assert_greater_than(res['size_on_disk'], 0)
assert_equal(res['softforks'], {
- 'bip34': {'type': 'buried', 'active': False, 'height': 500},
+ 'bip34': {'type': 'buried', 'active': True, 'height': 2},
'bip66': {'type': 'buried', 'active': False, 'height': 1251},
'bip65': {'type': 'buried', 'active': False, 'height': 1351},
'csv': {'type': 'buried', 'active': False, 'height': 432},