Author

Topic: sendtoaddress() returns wrong error code for message 'Insufficient funds' (Read 2454 times)

legendary
Activity: 1008
Merit: 1007
Hi guys,

I'm getting -4 returned when trying calling sendtoaddress() on a wallet with insufficient funds accompanying the message 'Insufficient funds'. According to https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.h, -4 = RPC_WALLET_ERROR, and the error should have been RPC_WALLET_INSUFFICIENT_FUNDS (-6).

Cheers, Paul.
Jump to: