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>
Thu, 4 Mar 2021 19:35:29 +0000 (11:35 -0800)
commitfec85536e23824d14abd23a499431a300d45f767
tree14039f7e5e0d74acdbfcc768fec4ed24f10e596d
parent5daf543441dd4b444351f016bb2e0a371df8cc13
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