Skip to content

Commit

Permalink
Fix overflow in priority calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Oct 20, 2015
1 parent 538c0f6 commit 3cdad45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
CAmount nAmount = COIN;
if (val.IsAmount())
nAmount = val.GetAmount();
dResult += (nAmount + nOffset) * (nHeight - nCoinsHeight + nOffset);
dResult += double(nAmount + nOffset) * double(nHeight - nCoinsHeight + nOffset);
}
}
return tx.ComputePriority(dResult);
Expand Down

0 comments on commit 3cdad45

Please sign in to comment.