Parameterize ChannelManager::new with a block hash
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 3 Mar 2021 19:24:55 +0000 (11:24 -0800)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 5 Mar 2021 23:44:54 +0000 (15:44 -0800)
commitd28fa54edbfde53171aa1e61b03502b02dc422d2
treecd0013e78dec208f98edf1c16565857057460f53
parentaf49a60e2d53945b7c6d9d6e425b9b6de6a1843e
Parameterize ChannelManager::new with a block hash

When ChannelMonitors are persisted, they need to store the most recent
block hash seen. However, for newly created channels the default block
hash is used. If persisted before a block is connected, the funding
output may be missed when syncing after a restart. Instead, initialize
ChannelManager with a "birthday" hash so it can be used later when
creating channels.
background-processor/src/lib.rs
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs