HomePhabricator

Fix potential timedata overflow

Description

Fix potential timedata overflow

Summary:
The add before division can potentially cause an overflow.
If we divide before adding, no overflow can occur.

Test Plan: ninja check

Reviewers: #bitcoin_abc, Fabien, deadalnix

Reviewed By: #bitcoin_abc, Fabien, deadalnix

Subscribers: deadalnix, Fabien

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

Details

Provenance
jasonbcoxAuthored on May 11 2020, 03:02
jasonbcoxPushed on May 12 2020, 00:14
Reviewer
Restricted Project
Differential Revision
D6025: Fix potential timedata overflow
Parents
rABCea63f129f964: refactoring: IsInitialBlockDownload -> CChainState
Branches
Unknown
Tags
Unknown