]> git.bitcoin.ninja Git - ldk-java/commitdiff
Test that channel_manager_bytes is not null when persisting v0.0.98.5
authorMatt Corallo <git-ldk-build@bluematt.me>
Thu, 1 Jul 2021 21:16:08 +0000 (21:16 +0000)
committerMatt Corallo <git-ldk-build@bluematt.me>
Thu, 1 Jul 2021 21:16:08 +0000 (21:16 +0000)
We had an apparently-spurious report that this was the case, though
it doesn't seem to be.

src/test/java/org/ldk/HumanObjectPeerTest.java

index c6a6f475fbf969fbcb174e0e7f479f7de8d08f76..d93a6d393230b5994747c289de728e82ba4b9fa0 100644 (file)
@@ -298,7 +298,7 @@ class HumanObjectPeerTestInstance {
                             pending_manager_events.notifyAll();
                         }
                     }
-                    @Override public void persist_manager(byte[] channel_manager_bytes) { }
+                    @Override public void persist_manager(byte[] channel_manager_bytes) { assert channel_manager_bytes.length > 1; }
                 });
                 this.chan_manager = constructor.channel_manager;
                 this.peer_manager = constructor.peer_manager;
@@ -331,7 +331,7 @@ class HumanObjectPeerTestInstance {
                                 pending_manager_events.notifyAll();
                             }
                         }
-                        @Override public void persist_manager(byte[] channel_manager_bytes) { }
+                        @Override public void persist_manager(byte[] channel_manager_bytes) { assert channel_manager_bytes.length > 1; }
                     });
                     this.chan_manager = constructor.channel_manager;
                     this.peer_manager = constructor.peer_manager;