aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorMichi Lumin <[email protected]>2021-05-06 15:30:55 -0600
committermichilumin <[email protected]>2021-07-30 16:07:22 -0600
commit575f734eec14b122b2e460dcefb56a54840ea479 (patch)
tree7765fbeda190b3630de9810f4b246a7c1c0c5e75 /src/validation.cpp
parentMerge pull request #2426 from xanimo/1.14.4-qa (diff)
downloaddiscoin-575f734eec14b122b2e460dcefb56a54840ea479.tar.xz
discoin-575f734eec14b122b2e460dcefb56a54840ea479.zip
Initial back end framework to separate wallet and relay fees + dust.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp8
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");
}