Advertisement
Guest User

Untitled

a guest
Jan 26th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.49 KB | None | 0 0
  1. diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
  2. index 051524a..9ae3665 100644
  3. --- a/src/wallet/rpcwallet.cpp
  4. +++ b/src/wallet/rpcwallet.cpp
  5. @@ -2773,10 +2773,6 @@ UniValue bumpfee(const JSONRPCRequest& request)
  6.                  throw JSONRPCError(RPC_INVALID_PARAMETER,
  7.                                     strprintf("Insufficient totalFee (cannot be less than required fee %s)",
  8.                                               FormatMoney(requiredFee)));
  9. -            } else if (totalFee > maxTxFee) {
  10. -                throw JSONRPCError(RPC_INVALID_PARAMETER,
  11. -                                   strprintf("Invalid totalFee (cannot be higher than maxTxFee %s)",
  12. -                                             FormatMoney(maxTxFee)));
  13.              }
  14.          }
  15.  
  16. @@ -2817,6 +2813,13 @@ UniValue bumpfee(const JSONRPCRequest& request)
  17.          }
  18.      }
  19.  
  20. +    // Check that in all cases the new fee doesn't violate maxTxFee
  21. +     if (nNewFee > maxTxFee) {
  22. +         throw JSONRPCError(RPC_MISC_ERROR,
  23. +                            strprintf("Specified or calculated fee %s is too high (cannot be higher than maxTxFee %s)",
  24. +                                      FormatMoney(nNewFee), FormatMoney(maxTxFee)));
  25. +     }
  26. +
  27.      // check that fee rate is higher than mempool's minimum fee
  28.      // (no point in bumping fee if we know that the new tx won't be accepted to the mempool)
  29.      // This may occur if the user set TotalFee or paytxfee too low, if fallbackfee is too low, or, perhaps,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement