Browse Source

[rpc] rawtx: Prepare fLimitFree to make it an option

0.14
MarcoFalke 8 years ago
parent
commit
fa8b02d36d
  1. 3
      src/rpc/rawtransaction.cpp

3
src/rpc/rawtransaction.cpp

@ -866,6 +866,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp) @@ -866,6 +866,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
uint256 hashTx = tx.GetHash();
bool fLimitFree = false;
CAmount nMaxRawTxFee = maxTxFee;
if (params.size() > 1 && params[1].get_bool())
nMaxRawTxFee = 0;
@ -878,7 +879,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp) @@ -878,7 +879,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
// push to local node and sync with wallets
CValidationState state;
bool fMissingInputs;
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, nMaxRawTxFee)) {
if (!AcceptToMemoryPool(mempool, state, tx, fLimitFree, &fMissingInputs, false, nMaxRawTxFee)) {
if (state.IsInvalid()) {
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
} else {

Loading…
Cancel
Save