Page MenuHomePhabricator

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

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

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC602b5fd67db5: Merge #11133: Document assumptions that are beoing made to avoid division by…
Summary

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.

Rationale:
* 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
https://github.com/bitcoin/bitcoin/pull/11133/

Test Plan
make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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: https://reviews.bitcoinabc.org/D3233#change-MdfjIvPLq5Hf

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