Skip to content

Commit

Permalink
Fix relaypriority calculation error
Browse files Browse the repository at this point in the history
  • Loading branch information
aciddude committed Jan 17, 2017
1 parent c29adf9 commit b0741f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight)
{
const CCoins &coins = GetCoins(txin.prevout.hash);
if (!coins.IsAvailable(txin.prevout.n)) continue;
if (coins.nHeight < nHeight) {
dResult += coins.vout[txin.prevout.n].nValue * (nHeight-coins.nHeight);
if (coins.nHeight <= nHeight) {
dResult += (double)(coins.vout[txin.prevout.n].nValue) * (nHeight-coins.nHeight);
}
}
return tx.ComputePriority(dResult);
Expand Down

0 comments on commit b0741f8

Please sign in to comment.