-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
I just had a user complaining that he couldn't withdraw. I checked the server logs and saw:
sendtoaddress DR35m6R4Xa2gPVJDBfPcaKGowMUDHL7E7U 15494733.34187310; Error: Error: Transaction creation failed (code -4)
sendtoaddress DR35m6R4Xa2gPVJDBfPcaKGowMUDHL7E7U 15494731.99990000; Error: Error: Transaction creation failed (code -4)
I just asked him to try again, and this time it worked:
success: 15476670.44612223 to DR35m6R4Xa2gPVJDBfPcaKGowMUDHL7E7U txid ea9bc97dda49dd36ac0e3fcb539922ec5d5464373d3296e9ecf4a38856ec9068
There was over 80M DOGE in the wallet at the time, so it's not an issue of insufficient funds being available for the transaction.
I searched for 'Transaction creation failed' in the source, and found it only in 2 places: 1) in sendmany() in bitcoinrpc.cpp, which I don't think should be called when running sendtoaddress, and 2) in CWallet::SendMoney() in wallet.cpp. So I guess it's (2) that was being triggered.
There's nothing special about the wallet. I only run it in one place, so it's not a double-spend issue. I have all the private keys available in the wallet, etc. It shouldn't have problems creating transactions.
I've made thousands of calls to sendtoaddress in bitcoind and never seen this error before. I guess it's a bug that has been fixed since the version dogecoin forked.
Is there a chance of using a more up-to-date codebase for dogecoin to avoid such issues?