test: simplify tests by using the pre-mined chain

This commit is contained in:
kouloumos committed 2023-01-16 19:14:21 +02:00
1 parent 42029a7fd4
commit 6bd098a838
5 files changed
+3 -29

No files matched your search

-6
View File
@@ -4,7 +4,6 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test resurrection of mined transactions when the blockchain is re-organized."""
from test_framework.blocktools import COINBASE_MATURITY
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.wallet import MiniWallet
@@ -13,16 +12,11 @@ from test_framework.wallet import MiniWallet
class MempoolCoinbaseTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
def run_test(self):
node = self.nodes[0]
wallet = MiniWallet(node)
# Add enough mature utxos to the wallet so that all txs spend confirmed coins
self.generate(wallet, 3)
self.generate(node, COINBASE_MATURITY)
# Spend block 1/2/3's coinbase transactions
# Mine a block
# Create three more transactions, spending the spends