]> git.bitcoin.ninja Git - ldk-java/blobdiff - src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
Fix write method generation w/ upstream changes
[ldk-java] / src / main / java / org / ldk / structs / UnsignedChannelUpdate.java
index 0fa6b1e55e12a27bc2cbc40aecf75c41226f34d7..936895d0755aba05f0f0eacbbbf0fb9c2adb889d 100644 (file)
@@ -11,7 +11,7 @@ public class UnsignedChannelUpdate extends CommonBase {
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
-               bindings.UnsignedChannelUpdate_free(ptr);
+               if (ptr != 0) { bindings.UnsignedChannelUpdate_free(ptr); }
        }
 
        public static UnsignedChannelUpdate constructor_clone(UnsignedChannelUpdate orig) {
@@ -93,9 +93,8 @@ public class UnsignedChannelUpdate extends CommonBase {
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
-       public byte[] write(UnsignedChannelUpdate obj) {
-               byte[] ret = bindings.UnsignedChannelUpdate_write(obj == null ? 0 : obj.ptr & ~1);
-               this.ptrs_to.add(obj);
+       public byte[] write() {
+               byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
        }