Hello everyone
I've got a problem with sending transactions from my wallet, I'd like to ask you if there is any solution for that.
I'm running a bitcoin service, where users can deposit and withdraw funds.
To make a withdrawal I use sendtoaddress RPC method.
The problem is that sometimes (mainly when I'm trying to process more than 10 withdrwalas one after another), wallet is throwing an error:
"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."
(Wallet will send the transaction after some time despite the error)
After the error occurs, wallet stops tracking the rest of bitcoins it had.
Example:
I have 100 BTC on the wallet (which came to me in one TX).
I start sending, withdrawals are proceeding one after another.
Then, at some moment, the error occurs.
I've already transferred 10 BTCs, but the wallet balance is now 0.
Sometimes when transactions that are already sent receive confirmations, the wallet brings the "lost" amount back (I think that at this time the amount is "frozen" in unconfirmed TXs), but from time to time amount shows up only after a rescan command.
I'm currently using Bitcoin Core v. 1.12.1.
Am I doing something wrong? Is there any solution for transaction rejeted error? Is there any way to prevent "losing" balance?
I have done some research about that and I didn't found any useful informations.
Thank you in advance