HomePhabricator

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

Description

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

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

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3695

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Oct 12 2017, 11:39
nakihitoCommitted on Jul 22 2019, 17:29
nakihitoPushed on Jul 22 2019, 18:35
Reviewer
Restricted Owners Package
Differential Revision
D3695: Merge #11133: Document assumptions that are beoing made to avoid division by zero
Parents
rSTAGING39f8c32faa2d: [Part 5 of 5] Add a CChainState class to clarify internal interfaces
Branches
Unknown
Tags
Unknown