Browse Source

Bugfix: off-by-one in priority calculation

miguelfreitas
Pieter Wuille 12 years ago
parent
commit
1e64c2d585
  1. 2
      src/main.cpp

2
src/main.cpp

@ -3830,7 +3830,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) @@ -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;
}

Loading…
Cancel
Save