mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 06:49:38 -04:00
Move node restart in test to better place.
Needed because the previous test used -persistmempool=0 and we need to forget about the transaction it created. Credit: Sjors Provoost
This commit is contained in:
parent
b420376aef
commit
47f9565c15
1 changed files with 3 additions and 2 deletions
|
@ -186,6 +186,9 @@ class MiningTest(BitcoinTestFramework):
|
||||||
assert tx_below_min_feerate['txid'] not in block_template_txids
|
assert tx_below_min_feerate['txid'] not in block_template_txids
|
||||||
assert tx_below_min_feerate['txid'] not in block_txids
|
assert tx_below_min_feerate['txid'] not in block_txids
|
||||||
|
|
||||||
|
# Restart node to clear mempool for the next test
|
||||||
|
self.restart_node(0)
|
||||||
|
|
||||||
def test_timewarp(self):
|
def test_timewarp(self):
|
||||||
self.log.info("Test timewarp attack mitigation (BIP94)")
|
self.log.info("Test timewarp attack mitigation (BIP94)")
|
||||||
node = self.nodes[0]
|
node = self.nodes[0]
|
||||||
|
@ -279,11 +282,9 @@ class MiningTest(BitcoinTestFramework):
|
||||||
def test_block_max_weight(self):
|
def test_block_max_weight(self):
|
||||||
self.log.info("Testing default and custom -blockmaxweight startup options.")
|
self.log.info("Testing default and custom -blockmaxweight startup options.")
|
||||||
|
|
||||||
# Restart the node
|
|
||||||
LARGE_TXS_COUNT = 10
|
LARGE_TXS_COUNT = 10
|
||||||
LARGE_VSIZE = int(((MAX_BLOCK_WEIGHT - DEFAULT_BLOCK_RESERVED_WEIGHT) / WITNESS_SCALE_FACTOR) / LARGE_TXS_COUNT)
|
LARGE_VSIZE = int(((MAX_BLOCK_WEIGHT - DEFAULT_BLOCK_RESERVED_WEIGHT) / WITNESS_SCALE_FACTOR) / LARGE_TXS_COUNT)
|
||||||
HIGH_FEERATE = Decimal("0.0003")
|
HIGH_FEERATE = Decimal("0.0003")
|
||||||
self.restart_node(0)
|
|
||||||
|
|
||||||
# Ensure the mempool is empty
|
# Ensure the mempool is empty
|
||||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue