diff options
| author | Patrick Lodder <[email protected]> | 2021-07-31 20:58:53 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-31 20:58:53 +0200 |
| commit | 7abb81b2ea3bd11e6d01476b2c1739d793006a83 (patch) | |
| tree | 7765fbeda190b3630de9810f4b246a7c1c0c5e75 /src/validation.cpp | |
| parent | Merge pull request #2426 from xanimo/1.14.4-qa (diff) | |
| parent | Initial back end framework to separate wallet and relay fees + dust. (diff) | |
| download | discoin-7abb81b2ea3bd11e6d01476b2c1739d793006a83.tar.xz discoin-7abb81b2ea3bd11e6d01476b2c1739d793006a83.zip | |
Merge pull request #2368 from michilumin/1.14.4-fees
1.14.4 fees backend improvements
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 6b5dcb188..46e586415 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -14,6 +14,7 @@ #include "consensus/merkle.h" #include "consensus/validation.h" #include "dogecoin.h" +#include "dogecoin-fees.h" #include "hash.h" #include "init.h" #include "policy/fees.h" @@ -83,10 +84,11 @@ bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT; uint256 hashAssumeValid; -CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); +//mlumin 5/2021: Changing this variable to a fee rate, because that's what it is, not a fee. Confusion bad. +CFeeRate minRelayTxFeeRate = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE; -CTxMemPool mempool(::minRelayTxFee); +CTxMemPool mempool(::minRelayTxFeeRate); /** * Returns true if there are nRequired or more blocks of minVersion or above @@ -767,7 +769,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C CAmount mempoolRejectFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFee(nSize); if (mempoolRejectFee > 0 && nModifiedFees < mempoolRejectFee) { return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "mempool min fee not met", false, strprintf("%d < %d", nFees, mempoolRejectFee)); - } else if (GetBoolArg("-relaypriority", DEFAULT_RELAYPRIORITY) && nModifiedFees < ::minRelayTxFee.GetFee(nSize) && !AllowFree(entry.GetPriority(chainActive.Height() + 1))) { + } else if (GetBoolArg("-relaypriority", DEFAULT_RELAYPRIORITY) && nModifiedFees < ::minRelayTxFeeRate.GetFee(nSize) && !AllowFree(entry.GetPriority(chainActive.Height() + 1))) { // Require that free transactions have sufficient priority to be mined in the next block. return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "insufficient priority"); } |