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

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jul 18 2019, 21:34

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

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