aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-07-11 18:52:41 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2014-06-26 11:49:46 +0000
commit2a72d4591f5adf25fcb4d0433b390ba6c37f57a9 (patch)
treeb46f8cc4f0529ca6d1faebdb5690ba3353044fc1 /src/main.cpp
parent343feecf562a39e7d898ece2fd745fcb9d4c90e9 (diff)
downloadbitcoin-2a72d4591f5adf25fcb4d0433b390ba6c37f57a9.tar.xz
JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>
Accepts the transaction into mined blocks at a higher (or lower) priority
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 ea47601081..e06c519ee2 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;