Enforce block connection ordering in unit and functional tests
authorMatt Corallo <git@bluematt.me>
Mon, 15 Mar 2021 23:49:51 +0000 (19:49 -0400)
committerMatt Corallo <git@bluematt.me>
Sat, 20 Mar 2021 03:32:38 +0000 (23:32 -0400)
commit561f0e22ac6dc3ff664a3698a12c5c920d35ae4d
tree2b2481f393399735fc77dba9e703ae7ac0050fe2
parente985334fd2a297a6b3a3e4637a4277147c4b9d7d
Enforce block connection ordering in unit and functional tests

This expands the assertions on block ordering to apply to
`#[cfg(test)]` builds in addition to normal builds, requiring that
unit and functional tests have syntactically-valid (ie the previous
block hash pointer and the heights match the blocks) blockchains.

This requires a reasonably nontrivial diff in the functional tests
however it is mostly straightforward changes.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/reorg_tests.rs