Merge #8357: [mempool] Fix relaypriority calculation error

94a34a5 Fix relaypriority calculation error (maiiz)
This commit is contained in:
Wladimir J. van der Laan 2016-09-27 16:32:26 +02:00
commit e9d5f6fec8
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -275,7 +275,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight, CAmount
assert(coins); assert(coins);
if (!coins->IsAvailable(txin.prevout.n)) continue; if (!coins->IsAvailable(txin.prevout.n)) continue;
if (coins->nHeight <= nHeight) { if (coins->nHeight <= nHeight) {
dResult += coins->vout[txin.prevout.n].nValue * (nHeight-coins->nHeight); dResult += (double)(coins->vout[txin.prevout.n].nValue) * (nHeight-coins->nHeight);
inChainInputValue += coins->vout[txin.prevout.n].nValue; inChainInputValue += coins->vout[txin.prevout.n].nValue;
} }
} }