From 1e64c2d585eeb6217d08a49c4cc7a89e0afd0421 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 23 Oct 2012 00:10:12 +0200 Subject: [PATCH] Bugfix: off-by-one in priority calculation --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index dd2f491ae..4386893ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3830,7 +3830,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) int64 nValueIn = coins.vout[txin.prevout.n].nValue; nTotalIn += nValueIn; - int nConf = pindexPrev->nHeight - coins.nHeight; + int nConf = pindexPrev->nHeight - coins.nHeight + 1; dPriority += (double)nValueIn * nConf; }