mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 00:40:34 +02:00
test: simplify tests by using the pre-mined chain
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test gettxoutproof and verifytxoutproof RPCs."""
|
||||
|
||||
from test_framework.blocktools import COINBASE_MATURITY
|
||||
from test_framework.messages import (
|
||||
CMerkleBlock,
|
||||
from_hex,
|
||||
@ -20,7 +19,6 @@ from test_framework.wallet import MiniWallet
|
||||
class MerkleBlockTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.setup_clean_chain = True
|
||||
self.extra_args = [
|
||||
[],
|
||||
["-txindex"],
|
||||
@ -28,12 +26,9 @@ class MerkleBlockTest(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
miniwallet = MiniWallet(self.nodes[0])
|
||||
# Add enough mature utxos to the wallet, so that all txs spend confirmed coins
|
||||
self.generate(miniwallet, 5)
|
||||
self.generate(self.nodes[0], COINBASE_MATURITY)
|
||||
|
||||
chain_height = self.nodes[1].getblockcount()
|
||||
assert_equal(chain_height, 105)
|
||||
assert_equal(chain_height, 200)
|
||||
|
||||
txid1 = miniwallet.send_self_transfer(from_node=self.nodes[0])['txid']
|
||||
txid2 = miniwallet.send_self_transfer(from_node=self.nodes[0])['txid']
|
||||
|
Reference in New Issue
Block a user