mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
Add a few notes about deserializing stale ChannelManagers
See diff for more details
This commit is contained in:
parent
23c3278b9d
commit
280de80298
1 changed files with 7 additions and 0 deletions
|
@ -3934,6 +3934,13 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> Writeable f
|
|||
/// 4) Reconnect blocks on your ChannelMonitors.
|
||||
/// 5) Move the ChannelMonitors into your local chain::Watch.
|
||||
/// 6) Disconnect/connect blocks on the ChannelManager.
|
||||
///
|
||||
/// Note that because some channels may be closed during deserialization, it is critical that you
|
||||
/// always deserialize only the latest version of a ChannelManager and ChannelMonitors available to
|
||||
/// you. If you deserialize an old ChannelManager (during which force-closure transactions may be
|
||||
/// broadcast), and then later deserialize a newer version of the same ChannelManager (which will
|
||||
/// not force-close the same channels but consider them live), you may end up revoking a state for
|
||||
/// which you've already broadcasted the transaction.
|
||||
pub struct ChannelManagerReadArgs<'a, Signer: 'a + Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
|
||||
where M::Target: chain::Watch<Signer>,
|
||||
T::Target: BroadcasterInterface,
|
||||
|
|
Loading…
Add table
Reference in a new issue