diff options
| author | practicalswift <[email protected]> | 2017-08-28 09:20:50 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-08-28 09:20:50 +0200 |
| commit | 55509f1a11003837714071d05ea878b340757a76 (patch) | |
| tree | f383c41d3a9564ff7bae1a86d7aa1b3f42b86c21 /src/policy/fees.cpp | |
| parent | Merge #11112: [developer-notes] By default, declare single-argument construct... (diff) | |
| download | discoin-55509f1a11003837714071d05ea878b340757a76.tar.xz discoin-55509f1a11003837714071d05ea878b340757a76.zip | |
Document assumptions that are being made to avoid division by zero
Diffstat (limited to 'src/policy/fees.cpp')
| -rw-r--r-- | src/policy/fees.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index b9476407c..5c92a0eb4 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -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]++; |