aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-11-20 16:48:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-02-02 20:08:51 +0100
commitfa79db2641182b47b4077345d8261d28c4a87bf0 (patch)
treec6ff08fcad0581a631a82b97835929ffef27b23c /src/rpc/rawtransaction.cpp
parentfd13fe7ca01b6104ce591af2b90ee6951ccc5a16 (diff)
downloadbitcoin-fa79db2641182b47b4077345d8261d28c4a87bf0.tar.xz
Move maxTxFee out of mempool
Also, remove default values in CMerkleTx::AcceptToMemoryPool()
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 2ec80f468c..de89fdeb0f 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -810,9 +810,9 @@ UniValue sendrawtransaction(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
uint256 hashTx = tx.GetHash();
- bool fOverrideFees = false;
- if (params.size() > 1)
- fOverrideFees = params[1].get_bool();
+ CAmount nMaxRawTxFee = maxTxFee;
+ if (params.size() > 1 && params[1].get_bool())
+ nMaxRawTxFee = 0;
CCoinsViewCache &view = *pcoinsTip;
const CCoins* existingCoins = view.AccessCoins(hashTx);
@@ -822,7 +822,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, !fOverrideFees)) {
+ if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, nMaxRawTxFee)) {
if (state.IsInvalid()) {
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
} else {