Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_unbroadcast.py
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | def test_broadcast(self): | ||||
txFS = node.signrawtransactionwithwallet(txF["hex"]) | txFS = node.signrawtransactionwithwallet(txF["hex"]) | ||||
rpc_tx_hsh = node.sendrawtransaction(txFS["hex"]) | rpc_tx_hsh = node.sendrawtransaction(txFS["hex"]) | ||||
# check that second node doesn't have these two txns | # check that second node doesn't have these two txns | ||||
mempool = self.nodes[1].getrawmempool() | mempool = self.nodes[1].getrawmempool() | ||||
assert rpc_tx_hsh not in mempool | assert rpc_tx_hsh not in mempool | ||||
assert wallet_tx_hsh not in mempool | assert wallet_tx_hsh not in mempool | ||||
# ensure that unbroadcast txs are persisted to mempool.dat | |||||
self.restart_node(0) | |||||
self.log.info("Reconnect nodes & check if they are sent to node 1") | self.log.info("Reconnect nodes & check if they are sent to node 1") | ||||
connect_nodes(node, self.nodes[1]) | connect_nodes(node, self.nodes[1]) | ||||
# fast forward into the future & ensure that the second node has the | # fast forward into the future & ensure that the second node has the | ||||
# txns | # txns | ||||
node.mockscheduler(15 * 60) # 15 min in seconds | node.mockscheduler(15 * 60) # 15 min in seconds | ||||
self.sync_mempools(timeout=30) | self.sync_mempools(timeout=30) | ||||
mempool = self.nodes[1].getrawmempool() | mempool = self.nodes[1].getrawmempool() | ||||
Show All 34 Lines |