Skip to content

Commit fa8b02d

Browse files
author
MarcoFalke
committed
[rpc] rawtx: Prepare fLimitFree to make it an option
1 parent fa28bfa commit fa8b02d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rpc/rawtransaction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
866866
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
867867
uint256 hashTx = tx.GetHash();
868868

869+
bool fLimitFree = false;
869870
CAmount nMaxRawTxFee = maxTxFee;
870871
if (params.size() > 1 && params[1].get_bool())
871872
nMaxRawTxFee = 0;
@@ -878,7 +879,7 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
878879
// push to local node and sync with wallets
879880
CValidationState state;
880881
bool fMissingInputs;
881-
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, nMaxRawTxFee)) {
882+
if (!AcceptToMemoryPool(mempool, state, tx, fLimitFree, &fMissingInputs, false, nMaxRawTxFee)) {
882883
if (state.IsInvalid()) {
883884
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
884885
} else {

0 commit comments

Comments
 (0)