diff options
| author | John Newbery <[email protected]> | 2017-02-07 14:27:57 -0500 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-06-05 19:01:16 +0000 |
| commit | 3ad00b4b32842e005af6378fd71eb9e293804cef (patch) | |
| tree | 242da567d49ed86d274f1320368e4f16fb336ebd /src/validation.cpp | |
| parent | doc: Preliminary release notes 0.14.2 (diff) | |
| download | discoin-3ad00b4b32842e005af6378fd71eb9e293804cef.tar.xz discoin-3ad00b4b32842e005af6378fd71eb9e293804cef.zip | |
Return correct error codes in bumpfee().
The bumpfee() RPC was returning misleading or incorrect error codes
(for example RPC_INVALID_ADDRESS_OR_KEY when the transaction was not
BIP125 replacable). This commit fixes those error codes:
- RPC_INVALID_ADDRESS_OR_KEY if an invalid address was provided:
- Invalid change address given
- RPC_INVALID_PARAMETER if a single (non-address/key) parameter is incorrect
- confTarget and totalFee options should not both be set.
- Invalid confTarget
- Insufficient totalFee (cannot be less than required fee)
- RPC_WALLET_ERROR for any other error
- Transaction has descendants in the wallet
- Transaction has descendants in the mempool
- Transaction has been mined, or is conflicted with a mined transaction
- Transaction is not BIP 125 replaceable
- Transaction has already been bumped
- Transaction contains inputs that don't belong to the wallet
- Transaction has multiple change outputs
- Transaction does not have a change output
- Fee is higher than maxTxFee
- New fee rate is less than the minimum fee rate
- Change output is too small.
This commit also updates the test cases to explicitly test the error code.
Github-Pull: #9853
Rebased-From: 6d07c62322f60eb2702c6654e994fc353bcfcf8c
Diffstat (limited to 'src/validation.cpp')
0 files changed, 0 insertions, 0 deletions