]> git.bitcoin.ninja Git - rust-lightning/commit
Pass along ChannelManager's last_block_hash
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 5 Mar 2021 02:22:37 +0000 (18:22 -0800)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 5 Mar 2021 02:22:37 +0000 (18:22 -0800)
commit6bdd3a3a9d082c98d6e0e18f651b4e5f0b273888
tree57fa5df9a506f8d46962d6f3e5cea40becc7d1a8
parentd788e36b514fecea47fa27c029ef86146692729f
Pass along ChannelManager's last_block_hash

ChannelMonitor keeps track of the last block connected. However, it is
initialized with the default block hash, which is a problem if the
ChannelMonitor is serialized before a block is connected. Instead, pass
ChannelManager's last_block_hash, which is initialized with a "birthday"
hash, when creating a new ChannelMonitor.
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs