diff options
author | Aurèle Oulès <aurele@oules.com> | 2022-10-02 18:21:41 +0200 |
---|---|---|
committer | Aurèle Oulès <aurele@oules.com> | 2022-12-15 09:53:50 +0100 |
commit | 71d9a7c03b44236c2fea2b74f92a69234d29f717 (patch) | |
tree | 72d6f6b22516a92594de2e002b62733844b443f7 /test/functional/feature_pruning.py | |
parent | e6906fcf9e4d5692ead6c9bf5a2e11673315a1f5 (diff) | |
download | bitcoin-71d9a7c03b44236c2fea2b74f92a69234d29f717.tar.xz |
test: Wallet imports on pruned nodes
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Co-authored-by: Andreas Kouloumos <kouloumosa@gmail.com>
Diffstat (limited to 'test/functional/feature_pruning.py')
-rwxr-xr-x | test/functional/feature_pruning.py | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index 58bc6ca67c..f01e9a451f 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -10,8 +10,10 @@ This test takes 30 mins or more (up to 2 hours) """ import os -from test_framework.blocktools import create_coinbase -from test_framework.messages import CBlock +from test_framework.blocktools import ( + create_block, + create_coinbase, +) from test_framework.script import ( CScript, OP_NOP, @@ -48,21 +50,7 @@ def mine_large_blocks(node, n): previousblockhash = int(best_block["hash"], 16) for _ in range(n): - # Build the coinbase transaction (with large scriptPubKey) - coinbase_tx = create_coinbase(height) - coinbase_tx.vin[0].nSequence = 2 ** 32 - 1 - coinbase_tx.vout[0].scriptPubKey = big_script - coinbase_tx.rehash() - - # Build the block - block = CBlock() - block.nVersion = best_block["version"] - block.hashPrevBlock = previousblockhash - block.nTime = mine_large_blocks.nTime - block.nBits = int('207fffff', 16) - block.nNonce = 0 - block.vtx = [coinbase_tx] - block.hashMerkleRoot = block.calc_merkle_root() + block = create_block(hashprev=previousblockhash, ntime=mine_large_blocks.nTime, coinbase=create_coinbase(height, script_pubkey=big_script)) block.solve() # Submit to the node |