Page MenuHomePhabricator

Merge #11133: Document assumptions that are beoing made to avoid division by zero

Authored by nakihito on Jul 18 2019, 21:34.



55509f1 Document assumptions that are being made to avoid division by zero (practicalswift)

Pull request description:

Document assumptions (via `assert(…)`:s) that are being made to avoid division by zero.

* Make it clear to human reviewers and non-human static analyzers that what might look like potential division by zero cases are written the way they are intentionally (these cases are currently flagged by various static analyzers).

Tree-SHA512: bbb67b1370afd8f39bda35f9e3a20f4325f017d94cc1bfac3b0d36c9f34c2d95a9efe11efe44db29fb4aadd25d8276d8f0e03c8806ac64f0d21d821912e13b8e

Backport of Core PR11133

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 6888
Build 11823: Bitcoin ABC Buildbot (legacy)
Build 11822: arc lint + arc unit

Event Timeline

nakihito created this revision.Jul 18 2019, 21:34
Owners added a reviewer: Restricted Owners Package.Jul 18 2019, 21:34
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 18 2019, 21:34
nakihito planned changes to this revision.Jul 18 2019, 21:34
nakihito requested review of this revision.Jul 19 2019, 17:44

We removed TxConfirmStats::removeTx() in policy/fees.cpp where there would have been a change.
qt/coincontroldialog.cpp was changed here to reflect the current state of Core:

Fabien accepted this revision.Jul 20 2019, 06:39
This revision is now accepted and ready to land.Jul 20 2019, 06:39