test: use getmempoolentry instead of getrawmempool in functional tests when appropriate

This commit is contained in:
Michael Dietz
2021-08-16 18:29:07 +05:00
parent 86dbd54ae8
commit 77349713b1
6 changed files with 40 additions and 44 deletions

View File

@@ -94,9 +94,7 @@ class MempoolUnbroadcastTest(BitcoinTestFramework):
self.log.info("Rebroadcast transaction and ensure it is not added to unbroadcast set when already in mempool")
rpc_tx_hsh = node.sendrawtransaction(txFS["hex"])
mempool = node.getrawmempool(True)
assert rpc_tx_hsh in mempool
assert not mempool[rpc_tx_hsh]['unbroadcast']
assert not node.getmempoolentry(rpc_tx_hsh)['unbroadcast']
def test_txn_removal(self):
self.log.info("Test that transactions removed from mempool are removed from unbroadcast set")