mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +02:00
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:
@@ -24,7 +24,7 @@ class CreateTxWalletTest(BitcoinTestFramework):
|
||||
def run_test(self):
|
||||
self.log.info('Create some old blocks')
|
||||
self.nodes[0].setmocktime(TIME_GENESIS_BLOCK)
|
||||
self.nodes[0].generate(200)
|
||||
self.generate(self.nodes[0], 200)
|
||||
self.nodes[0].setmocktime(0)
|
||||
|
||||
self.test_anti_fee_sniping()
|
||||
@@ -38,7 +38,7 @@ class CreateTxWalletTest(BitcoinTestFramework):
|
||||
assert_equal(tx['locktime'], 0)
|
||||
|
||||
self.log.info('Check that anti-fee-sniping is enabled when we mine a recent block')
|
||||
self.nodes[0].generate(1)
|
||||
self.generate(self.nodes[0], 1)
|
||||
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
|
||||
tx = self.nodes[0].decoderawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
||||
assert 0 < tx['locktime'] <= 201
|
||||
|
Reference in New Issue
Block a user