JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>

Accepts the transaction into mined blocks at a higher (or lower) priority
This commit is contained in:
Luke Dashjr
2012-07-11 18:52:41 +00:00
parent 343feecf56
commit 2a72d4591f
8 changed files with 74 additions and 3 deletions

View File

@@ -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;