mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 04:32:20 +02:00
test: Use generate* from TestFramework, not TestNode
This commit is contained in:
@ -244,7 +244,7 @@ class MempoolPackageLimitsTest(BitcoinTestFramework):
|
|||||||
assert_equal(txres["package-error"], "package-mempool-limits")
|
assert_equal(txres["package-error"], "package-mempool-limits")
|
||||||
|
|
||||||
# Clear mempool and check that the package passes now
|
# Clear mempool and check that the package passes now
|
||||||
node.generate(1)
|
self.generate(node, 1)
|
||||||
assert all([res["allowed"] for res in node.testmempoolaccept(rawtxs=package_hex)])
|
assert all([res["allowed"] for res in node.testmempoolaccept(rawtxs=package_hex)])
|
||||||
|
|
||||||
def test_anc_count_limits(self):
|
def test_anc_count_limits(self):
|
||||||
|
@ -63,7 +63,7 @@ class TransactionTimeRescanTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
# generate some btc to create transactions and check blockcount
|
# generate some btc to create transactions and check blockcount
|
||||||
initial_mine = COINBASE_MATURITY + 1
|
initial_mine = COINBASE_MATURITY + 1
|
||||||
minernode.generatetoaddress(initial_mine, m1)
|
self.generatetoaddress(minernode, initial_mine, m1)
|
||||||
assert_equal(minernode.getblockcount(), initial_mine + 200)
|
assert_equal(minernode.getblockcount(), initial_mine + 200)
|
||||||
|
|
||||||
# synchronize nodes and time
|
# synchronize nodes and time
|
||||||
@ -76,7 +76,7 @@ class TransactionTimeRescanTest(BitcoinTestFramework):
|
|||||||
miner_wallet.sendtoaddress(wo1, 10)
|
miner_wallet.sendtoaddress(wo1, 10)
|
||||||
|
|
||||||
# generate blocks and check blockcount
|
# generate blocks and check blockcount
|
||||||
minernode.generatetoaddress(COINBASE_MATURITY, m1)
|
self.generatetoaddress(minernode, COINBASE_MATURITY, m1)
|
||||||
assert_equal(minernode.getblockcount(), initial_mine + 300)
|
assert_equal(minernode.getblockcount(), initial_mine + 300)
|
||||||
|
|
||||||
# synchronize nodes and time
|
# synchronize nodes and time
|
||||||
@ -89,7 +89,7 @@ class TransactionTimeRescanTest(BitcoinTestFramework):
|
|||||||
miner_wallet.sendtoaddress(wo2, 5)
|
miner_wallet.sendtoaddress(wo2, 5)
|
||||||
|
|
||||||
# generate blocks and check blockcount
|
# generate blocks and check blockcount
|
||||||
minernode.generatetoaddress(COINBASE_MATURITY, m1)
|
self.generatetoaddress(minernode, COINBASE_MATURITY, m1)
|
||||||
assert_equal(minernode.getblockcount(), initial_mine + 400)
|
assert_equal(minernode.getblockcount(), initial_mine + 400)
|
||||||
|
|
||||||
# synchronize nodes and time
|
# synchronize nodes and time
|
||||||
@ -102,7 +102,7 @@ class TransactionTimeRescanTest(BitcoinTestFramework):
|
|||||||
miner_wallet.sendtoaddress(wo3, 1)
|
miner_wallet.sendtoaddress(wo3, 1)
|
||||||
|
|
||||||
# generate more blocks and check blockcount
|
# generate more blocks and check blockcount
|
||||||
minernode.generatetoaddress(COINBASE_MATURITY, m1)
|
self.generatetoaddress(minernode, COINBASE_MATURITY, m1)
|
||||||
assert_equal(minernode.getblockcount(), initial_mine + 500)
|
assert_equal(minernode.getblockcount(), initial_mine + 500)
|
||||||
|
|
||||||
self.log.info('Check user\'s final balance and transaction count')
|
self.log.info('Check user\'s final balance and transaction count')
|
||||||
|
Reference in New Issue
Block a user