Add compile time verification of assumptions we're currently making implicitly/tacitly
Summary:
Add compile time verification of assumptions we're currently making implicitly/tacitly.
Backport of Bitcoin Core PR15391
https://github.com/bitcoin/bitcoin/pull/15391
Test Plan:
make check
Reviewers: Fabien, #bitcoin_abc, deadalnix
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D4043