- bindings updates 2020-10-java-bindings-base
authorMatt Corallo <git@bluematt.me>
Thu, 11 Feb 2021 18:01:07 +0000 (13:01 -0500)
committerMatt Corallo <git@bluematt.me>
Thu, 11 Feb 2021 21:19:56 +0000 (16:19 -0500)
lightning-c-bindings/include/lightning.h
lightning-c-bindings/src/ln/channelmanager.rs

index 509afd2c5ecc1f47a03be63af546370021b0f305..3b04fd70c06a1ed243cc928ad5328b59782e1cbf 100644 (file)
@@ -3572,6 +3572,13 @@ typedef struct LDKChannelMessageHandler {
  * 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.
  */
 typedef struct MUST_USE_STRUCT LDKChannelManagerReadArgs {
    /**
index 77c6b5aded58e6b461ae121f579c0e8734e09093..a5304ce959983eb82832979477fce1e682f0d9c1 100644 (file)
@@ -779,6 +779,13 @@ type nativeChannelManagerReadArgs = nativeChannelManagerReadArgsImport<'static,
 /// 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.
 #[must_use]
 #[repr(C)]
 pub struct ChannelManagerReadArgs {