mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-20 04:53:13 +02:00
qa: Remove mocktime unless required
This commit is contained in:
@ -7,17 +7,25 @@ from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
)
|
||||
from test_framework.blocktools import (
|
||||
TIME_GENESIS_BLOCK,
|
||||
)
|
||||
|
||||
|
||||
class CreateTxWalletTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = False
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
self.log.info('Create some old blocks')
|
||||
self.nodes[0].setmocktime(TIME_GENESIS_BLOCK)
|
||||
self.nodes[0].generate(200)
|
||||
self.nodes[0].setmocktime(0)
|
||||
|
||||
self.log.info('Check that we have some (old) blocks and that anti-fee-sniping is disabled')
|
||||
assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200)
|
||||
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
|
||||
|
Reference in New Issue
Block a user