False error notifcation (double spent) 'code' => -4, 'message'

1

Now and than I seem to get a consistent false error notification.

Error message:

Request error: array ( 'code' => -4, '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 the wallet and coins were spent in the copy but not marked as spent here.', ).

After the notifcation the getbalance and getbalance '' '1' are in conflict. Getbalance not showing the actual balance correct anymore. Despite the error the bitcoin transactions gets broadcasted correctly on to the network and within a couple of days (most of the time) the transactions get processed successfully.

Info on client

{
  "version": 130000,
  "protocolversion": 70014,
  "walletversion": 130000,
  "balance": 13.56365098,
  "blocks": 455269,
  "timeoffset": 0,
  "connections": 8,
  "proxy": "",
  "difficulty": 440779902286.5892,
  "testnet": false,
  "keypoololdest": 1488349424,
  "keypoolsize": 100,
  "paytxfee": 0.00150000,
  "relayfee": 0.00010000,
  "errors": ""
}

Anyone here having the same problems lately?

Mike Hutting

Posted 2017-03-01T12:11:50.517

Reputation: 11

Is there any possibility you could try 0.14.0rc1 or later? It has a more useful error message for that error.Nick ODell 2017-03-01T17:40:02.480

Answers

0

The reason for this could be that you spend a long chain of unconfirmed transactions. In 0.14, Core has improved this behaviour and added an startup option called -walletrejectlongchains (needs to be enabled, default is off).

Otherwise your wallet might spend long chains of unconfirmed coins but your node/mempool won't accept them. Also, have a look at the -limitancestorcount settings and consider reading the pull request here

Jonas Schnelli

Posted 2017-03-01T12:11:50.517

Reputation: 5 465

Hi Jonas,

Thank you for your reply! Could it be that the clients balance gets deducted without the transaction actually reaching the mempool?

I made a transaction yesterday getting the 404 message described above. The amount was deducted from the balance. When checking if the tx was in the mempool by : getmempoolentry txid response is:

error code: -5 error message: Transaction not in mempool

Could it be that the client assums the coins are sent despite not being broadcasted on to the network? And how to spend/send the coins again? – Mike Hutting 2017-03-02T19:31:36.753

Just to be sure I understand you correctly. Regarding the long chain of unconfirmed transactions. Is the transaction change considered to be part of the long chain of unconfirmed transactions? Like in this example when I start with a balance of 25 BTC on a single address and start sending 100 transactions in <1 hour without any of them being confirmed.Mike Hutting 2017-03-02T19:40:22.993

Hi. The transaction was probably successfully added to the wallet, but could not be broadcasted. So the balance is correct, the transaction is made,... but do to your local mempool policies it could not be broadcasted. You can try to increase your -limitancestorcount (but other peers mempool could reject it) or try to "abandon" the transaction (look for abandontransaction).Jonas Schnelli 2017-03-03T10:26:29.870