Skip to content

Commit 847b6ed

Browse files
dunxenjnewbery
authored andcommitted
[test] Test transactions are not re-added to unbroadcast set
1 parent 2837a9f commit 847b6ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/mempool_unbroadcast.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ def test_broadcast(self):
9292
self.disconnect_nodes(0, 1)
9393
node.disconnect_p2ps()
9494

95+
self.log.info("Rebroadcast transaction and ensure it is not added to unbroadcast set when already in mempool")
96+
rpc_tx_hsh = node.sendrawtransaction(txFS["hex"])
97+
mempool = node.getrawmempool(True)
98+
assert rpc_tx_hsh in mempool
99+
assert not mempool[rpc_tx_hsh]['unbroadcast']
100+
95101
def test_txn_removal(self):
96102
self.log.info("Test that transactions removed from mempool are removed from unbroadcast set")
97103
node = self.nodes[0]

0 commit comments

Comments
 (0)