mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Document assumptions that are being made to avoid division by zero
This commit is contained in:
@@ -503,6 +503,7 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe
|
||||
}
|
||||
}
|
||||
if (!inBlock && (unsigned int)blocksAgo >= scale) { // Only counts as a failure if not confirmed for entire period
|
||||
assert(scale != 0);
|
||||
unsigned int periodsAgo = blocksAgo / scale;
|
||||
for (size_t i = 0; i < periodsAgo && i < failAvg.size(); i++) {
|
||||
failAvg[i][bucketindex]++;
|
||||
|
||||
Reference in New Issue
Block a user