11

A transaction I made a few hours ago is stuck as "pending", after sending via monero-wallet-cli. The transaction has not been picked up in a block yet.

I found this comment on Reddit by /u/gingeropolous: https://www.reddit.com/r/Monero/comments/4qilio/transaction_stuck_at_pending_on_simplewallet_how/d4tazy6

Is there a way to "cancel" the transaction without having to do a blockchain rescan like described in that comment? Also, what steps can I take to prevent a transaction from getting stuck as pending in the future?

1
  • i made this same mistake and find multiple people telling me to flush the txpool with monerod. What the hell is monerod, or monero_cli!!! I don't know where to find those things. Commented Sep 15, 2020 at 20:38

1 Answer 1

12

You can first use the show_transfers command in monero-wallet-cli to see if your transaction shows there. It should show as "pending". Subsequently, you can use the flush_txpool command in monerod (the daemon). The wallet will shortly notice this and change the status of the transaction from "pending" to "failed". In order to get the right balance, however, you also need to run the rescan_spent command in monero-wallet-cli. Note that this minor bug (i.e. not showing the correct balance) is fixed in master currently, but not yet present in the binaries (which you are likely using).

If this doesn't work, you will have to use the rescan_bc command in monero-wallet-cli.

Also, what steps can I take to prevent a transaction from getting stuck as pending in the future?

Make sure your daemon is fully synced before sending out a transaction.

Source: https://bitcointalk.org/index.php?topic=583449.msg16066918#msg16066918

EDIT 11/9/2017: Currently, transactions will drop from the local mempool after 24 hours, which will result in the transaction status changing to Failed in monero-wallet-cli. Therefore, this answer is not applicable anymore. If, however, your transaction is not relayed and your transaction is time sensitive, you can still apply this answer. You can check if your transaction is relayed by checking the mempool on block explorers like, for instance, XMRchain, MoneroBase, or MoneroBlocks.

1
  • Warning: this will do what you want (remove the tx from the "pending" list), but not how you want (the tx will likely get mined at some point so if you have sent again, you'll either pay twice, or the second tx will conflict).
    – user36303
    Commented Nov 9, 2017 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.