[refactor] drop IsInvalid(nDoSOut)
Summary:
Co-authored-by: Anthony Towns <aj@erisian.com.au>
This is a partial backport of Core PR15141 : https://github.com/bitcoin/bitcoin/pull/15141/commits/b8b4c80146780f9011abbd1be72343cc965c07b9
Depends on D6683
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D6684