Bitcoin was started like this a few days ago, after compiling latest version from git (4ee149a): bitcoind -daemon -txconfirmtarget=3 -sendfreetransactions -spendzeroconfchange=0
After running a few days, mempool trimming has begun: $ bitcoin-cli getmempoolinfo { "size": 12167, "bytes": 137785057, "usage": 297081872, "maxmempool": 300000000, "mempoolminfee": 0.00001034 }
And now it rejects my own transactions. I have a lot of old unspent coins in my wallet, which often result in high enough priority for a free transaction:
$ bitcoin-cli sendfrom "" 1[redacted] 1.05 error code: -4 error message: Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.
It was clearly rejected: $ bitcoin-cli listtransactions "" 1 [ { "account": "", "address": "1[redacted]", "category": "send", "amount": -1.05000000, "vout": 0, "fee": 0.00000000, "confirmations": -1, "txid": "...", "walletconflicts": [ ], "time": 1447066461, "timereceived": 1447066461 } ]
But this can not be trusted! After a restart of bitcoind, the transaction shows up again, now with 0 confirmations. This can lead to double transmissions if the user think the first attempt actually failed: [ { "account": "", "address": "1[redacted]", "category": "send", "amount": -1.05000000, "vout": 0, "fee": 0.00000000, "confirmations": 0, "txid": "...", "walletconflicts": [ ], "time": 1447066461, "timereceived": 1447066461 } ]
Private details about the transaction available on request.
Suggestion: 0. Revert the current mempool trimming. It is dangerous.
- Take priority into account when trimming. Keep transactions with sufficient priority to get mined before the transactions which are removed due to low fee, using estimatefee and estimatepriority as guidance. This will help prioritize non-spammy transactions as well.
- Give own transactions infinite priority. If you are mining, this will make sure your own transactions will always be included if you leave room for free transactions.