diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-07-11 18:52:41 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2014-06-26 11:49:46 +0000 |
commit | 2a72d4591f5adf25fcb4d0433b390ba6c37f57a9 (patch) | |
tree | b46f8cc4f0529ca6d1faebdb5690ba3353044fc1 /src/main.cpp | |
parent | 343feecf562a39e7d898ece2fd745fcb9d4c90e9 (diff) |
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.cpp | 10 |
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; |