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