HomePhabricator

Use CheckForkWarningConditionsOnNewFork from FindMostWorkChain

Description

Use CheckForkWarningConditionsOnNewFork from FindMostWorkChain

Summary:
Also pass the proper chain tip from ActivateBestChainStep. this ensure that we know the whole extent of the chain.

Changed the error message to reflect the fact that there is no guarantee that the chain is valid at all.

Test Plan:

make check
./src/bitcoind -regtest -printtoconsole
./src/bitcoin-cli generate 100
./src/bitcoin-cli invalidateblock <block hash that is 6+ block deep>

Check that the alert message triggers now.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity

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

Details

Provenance
deadalnixAuthored on Oct 20 2018, 19:34
deadalnixPushed on Oct 21 2018, 09:55
Reviewer
Restricted Project
Differential Revision
D1950: Use CheckForkWarningConditionsOnNewFork from FindMostWorkChain
Parents
rSTAGING24abeea2d827: Properly track the "best" invalid tip
Branches
Unknown
Tags
Unknown