]> git.bitcoin.ninja Git - rust-lightning/commit
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:31:27 +0000 (23:31 -0400)
commit349d780103f72ad5dac7cb308acfed80eb1daf7d
tree6fe6a855e38124a2291231760901b014b7bf3a7f
parent26a3eda933112fa6f5362a3d11d3d14664680113
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