-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Description
bitcoin@btcserver:~/bitcoin-0.3.21/bin/32$ ./bitcoind sendtoaddress 16bRQcbr1xxxu27ZQxqGhi242eL 0.2
error: {"code":-4,"message":"Error: This transaction requires a transaction fee of at least 0.01 because of its amount, complexity, or use of recently received funds "}
I guess in the first place I'd like an error message which comes back with a "TXFEEREQUIRED" status, giving that fee as its value, rather than needing to parse English text to find it.
In the second place, I'd like to be able to do something like:
try {
rpc_bitcoind("sendtoaddress", address, amount);
} catch (bitcoindexception e) {
if (e->txfee) {
try {
rpc_bitcoind("sendtoaddress", address, amount, e->txfee);
} catch {
debug("zomgwtflolbbq");
}
} else {
debug("fail", e.toString());
}
}