aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-06-26 16:19:35 +0200
committerWladimir J. van der Laan <[email protected]>2014-06-26 16:20:01 +0200
commitffb32acfab33a58c32e0249a22dd56e39c82d417 (patch)
treeb82c2b4e648ba20b269b0843b277deda307f01ee /src/main.cpp
parentMerge pull request #4414 (diff)
parentJSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee> (diff)
downloaddiscoin-ffb32acfab33a58c32e0249a22dd56e39c82d417.tar.xz
discoin-ffb32acfab33a58c32e0249a22dd56e39c82d417.zip
Merge pull request #1583
2a72d45 JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee> (Luke Dashjr)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ea4760108..e06c519ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -789,6 +789,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
{
+ {
+ LOCK(mempool.cs);
+ uint256 hash = tx.GetHash();
+ double dPriorityDelta = 0;
+ int64_t nFeeDelta = 0;
+ mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
+ if (dPriorityDelta > 0 || nFeeDelta > 0)
+ return 0;
+ }
+
// Base fee is either minTxFee or minRelayTxFee
CFeeRate baseFeeRate = (mode == GMF_RELAY) ? tx.minRelayTxFee : tx.minTxFee;