Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: -ck on February 11, 2017, 10:20:22 PM



Title: Zap wallet txns in pruned mode?
Post by: -ck on February 11, 2017, 10:20:22 PM
Since -zapwallettxes implies -rescan, it means its use is effectively mutually exclusive of using pruned mode. Does anyone have any suggestions for a workaround without redownloading the whole blockchain again?


Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on February 11, 2017, 11:34:21 PM
Right click the transaction and choose "Abandon transaction" or use the abandontransaction command in the rpc console.

Or you can use something like pywallet and remove the transaction from your wallet file manually.


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 11, 2017, 11:35:35 PM
Right click the transaction and choose "Abandon transaction" or use the abandontransaction command in the rpc console.

Or you can use something like pywallet and remove the transaction from your wallet file manually.
Abandon transaction is greyed out so presumably it's subject to the same limitations as zap.


Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on February 11, 2017, 11:45:39 PM
Abandon transaction is greyed out so presumably it's subject to the same limitations as zap.
No, that means that something else is blocking it from being abandoned. I'm pretty sure it still works in pruned mode as I'm pretty sure I did it before.


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 11, 2017, 11:57:24 PM
Abandon transaction is greyed out so presumably it's subject to the same limitations as zap.
No, that means that something else is blocking it from being abandoned. I'm pretty sure it still works in pruned mode as I'm pretty sure I did it before.
That's interesting in itself. What else could possibly be blocking it?

Code:
bitcoin-cli abandontransaction XX
error code: -5
error message:
Transaction not eligible for abandonment


Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on February 12, 2017, 12:02:01 AM
That's interesting in itself. What else could possibly be blocking it?

Code:
bitcoin-cli abandontransaction XX
error code: -5
error message:
Transaction not eligible for abandonment
Anything that would cause this function: https://github.com/bitcoin/bitcoin/blob/02464da5e4aa8c19d4fff3859dcdee822e2af78c/src/wallet/wallet.cpp#L1052 to return false. So it seems the only criteria are that the transaction is not in the mempool and it is not confirmed. So clearing the mempool by restarting the node should work (if you are using any version greater than 0.13.2 i.e. a build of master, then you need to delete mempool.dat in the datadir).


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 12, 2017, 12:03:38 AM
That's interesting in itself. What else could possibly be blocking it?

Code:
bitcoin-cli abandontransaction XX
error code: -5
error message:
Transaction not eligible for abandonment
Anything that would cause this function: https://github.com/bitcoin/bitcoin/blob/02464da5e4aa8c19d4fff3859dcdee822e2af78c/src/wallet/wallet.cpp#L1052 to return false. So it seems the only criteria are that the transaction is not in the mempool and it is not confirmed. So clearing the mempool by restarting the node should work (if you are using any version greater than 0.13.2 i.e. a build of master, then you need to delete mempool.dat in the datadir).
Weird, I've restarted it a few times, perhaps another node that I have whitelisted elsewhere is submitting the transaction immediately once I restart. I'll try isolating it from the network and doing it.


Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on February 12, 2017, 12:13:21 AM
Weird, I've restarted it a few times, perhaps another node that I have whitelisted elsewhere is submitting the transaction immediately once I restart. I'll try isolating it from the network and doing it.
If you run
Code:
getmempoolentry <txid>

beforehand and it tells you that the transaction is not in the mempool but you still can't abandon it, then there must be something else that is blocking it from being abandoned, but I don't know what that could be.


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 12, 2017, 12:17:28 AM
Weird, I've restarted it a few times, perhaps another node that I have whitelisted elsewhere is submitting the transaction immediately once I restart. I'll try isolating it from the network and doing it.
If you run
Code:
getmempoolentry <txid>

beforehand and it tells you that the transaction is not in the mempool but you still can't abandon it, then there must be something else that is blocking it from being abandoned, but I don't know what that could be.
Well it is in the mempool and it's 0.13.2 and restarting it doesn't remove it from the mempool... Hmm it could be because I getblocktemplates regularly from the bitcoind... or not :s


Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on February 12, 2017, 12:54:17 AM
Well it is in the mempool and it's 0.13.2 and restarting it doesn't remove it from the mempool... Hmm it could be because I getblocktemplates regularly from the bitcoind... or not :s
Oh, duh, of course its in the mempool, restarting will have the wallet put the transactions back into the mempool on start. You need to set the -walletbroadcast=false command line option when you start it up again in order to prevent that from happening.


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 12, 2017, 01:17:42 AM
Well it is in the mempool and it's 0.13.2 and restarting it doesn't remove it from the mempool... Hmm it could be because I getblocktemplates regularly from the bitcoind... or not :s
Oh, duh, of course its in the mempool, restarting will have the wallet put the transactions back into the mempool on start. You need to set the -walletbroadcast=false command line option when you start it up again in order to prevent that from happening.
That did it. The abandon transaction option was no longer greyed out and now the transaction still appears in the interface but is marked in red and the details say not in mempool, even after restarting. I guess this is enough since theoretically it could still be bouncing around somewhere in the network at large. Thanks!


Title: Re: Zap wallet txns in pruned mode?
Post by: -ck on February 13, 2017, 12:42:26 PM
Hah the network had the last laugh and processed the transaction after about 3 days anyway.


Title: Re: Zap wallet txns in pruned mode?
Post by: jnano on August 18, 2019, 04:40:32 PM
The clunky interface is still around in the latest version.

"Abandon transaction" should never be grayed out. When it can't work, it should explain why. Or better, automatically stop broadcasting the wallet.



Title: Re: Zap wallet txns in pruned mode?
Post by: achow101 on August 18, 2019, 04:52:33 PM
The clunky interface is still around in the latest version.

"Abandon transaction" should never be grayed out. When it can't work, it should explain why. Or better, automatically stop broadcasting the wallet.
Complaining about it here isn't going to help. Pretty much none of the Bitcoin Core developers read this forum (except for me). If you want to request a feature or change, open an issue in the github repo (https://github.com/bitcoin/bitcoin/issues)


Title: Re: Zap wallet txns in pruned mode?
Post by: jnano on August 18, 2019, 05:08:27 PM
I guess I'm just venting with no specific goal in mind. :)

Core's focus seems to be the network and RPC rather than the GUI. There are more important GUI features to deal with, so no point in bringing up this specific one.