Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_gettransactionstatus.py
| Show All 38 Lines | def run_test(self): | ||||
| self.log.info("Tx is in the conflicting pool") | self.log.info("Tx is in the conflicting pool") | ||||
| conflicting_tx = wallet.create_self_transfer( | conflicting_tx = wallet.create_self_transfer( | ||||
| utxo_to_spend=utxo, target_size=179 | utxo_to_spend=utxo, target_size=179 | ||||
| ) | ) | ||||
| peer.send_txs_and_test( | peer.send_txs_and_test( | ||||
| [from_wallet_tx(conflicting_tx)], | [from_wallet_tx(conflicting_tx)], | ||||
| node, | node, | ||||
| success=False, | success=False, | ||||
| expect_disconnect=False, | |||||
| reject_reason="txn-mempool-conflict", | reject_reason="txn-mempool-conflict", | ||||
| ) | ) | ||||
| assert_equal( | assert_equal( | ||||
| node.gettransactionstatus(conflicting_tx["txid"])["pool"], "conflicting" | node.gettransactionstatus(conflicting_tx["txid"])["pool"], "conflicting" | ||||
| ) | ) | ||||
| self.log.info("Tx is in the orphan pool") | self.log.info("Tx is in the orphan pool") | ||||
| orphan_tx = wallet.create_self_transfer_chain(chain_length=2)[-1] | orphan_tx = wallet.create_self_transfer_chain(chain_length=2)[-1] | ||||
| peer.send_txs_and_test( | peer.send_txs_and_test( | ||||
| [from_wallet_tx(orphan_tx)], | [from_wallet_tx(orphan_tx)], | ||||
| node, | node, | ||||
| success=False, | success=False, | ||||
| expect_disconnect=False, | |||||
| reject_reason="bad-txns-inputs-missingorspent", | reject_reason="bad-txns-inputs-missingorspent", | ||||
| ) | ) | ||||
| assert_equal(node.gettransactionstatus(orphan_tx["txid"])["pool"], "orphanage") | assert_equal(node.gettransactionstatus(orphan_tx["txid"])["pool"], "orphanage") | ||||
| self.log.info("Tx is in a block") | self.log.info("Tx is in a block") | ||||
| tip = self.generate(wallet, 1)[0] | tip = self.generate(wallet, 1)[0] | ||||
| assert_equal(node.getrawmempool(), []) | assert_equal(node.getrawmempool(), []) | ||||
| assert_equal(node.gettransactionstatus(mempool_tx["txid"])["pool"], "none") | assert_equal(node.gettransactionstatus(mempool_tx["txid"])["pool"], "none") | ||||
| Show All 22 Lines | |||||