scripted-diff: Use generate* from TestFramework
-BEGIN VERIFY SCRIPT-
sed --regexp-extended -i \
's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \
$(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf')
-END VERIFY SCRIPT-
This commit is contained in:
117 files changed
+468
-468
No files matched your search
@@ -31,13 +31,13 @@ class UTXOSetHashTest(BitcoinTestFramework):
|
||||
|
||||
# Generate 100 blocks and remove the first since we plan to spend its
|
||||
# coinbase
|
||||
block_hashes = wallet.generate(1) + node.generate(99)
|
||||
block_hashes = self.generate(wallet, 1) + self.generate(node, 99)
|
||||
blocks = list(map(lambda block: from_hex(CBlock(), node.getblock(block, False)), block_hashes))
|
||||
blocks.pop(0)
|
||||
|
||||
# Create a spending transaction and mine a block which includes it
|
||||
txid = wallet.send_self_transfer(from_node=node)['txid']
|
||||
tx_block = node.generateblock(output=wallet.get_address(), transactions=[txid])
|
||||
tx_block = self.generateblock(node, output=wallet.get_address(), transactions=[txid])
|
||||
blocks.append(from_hex(CBlock(), node.getblock(tx_block['hash'], False)))
|
||||
|
||||
# Serialize the outputs that should be in the UTXO set and add them to
|
||||
|
||||
Reference in new issue
Block a user