X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FTrustedClosingTransaction.java;h=569c7140a874d604fe7c761e0d20a8ff8a71e970;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=027f9cd6751e793611ce8a1b7144c8ade77b0c5e;hpb=a7653cf8717b1f9df4d3f4c4bd0b1f50f3bbc230;p=ldk-java diff --git a/src/main/java/org/ldk/structs/TrustedClosingTransaction.java b/src/main/java/org/ldk/structs/TrustedClosingTransaction.java index 027f9cd6..569c7140 100644 --- a/src/main/java/org/ldk/structs/TrustedClosingTransaction.java +++ b/src/main/java/org/ldk/structs/TrustedClosingTransaction.java @@ -4,6 +4,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; @@ -29,6 +30,7 @@ public class TrustedClosingTransaction extends CommonBase { */ public byte[] built_transaction() { byte[] ret = bindings.TrustedClosingTransaction_built_transaction(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -39,6 +41,9 @@ public class TrustedClosingTransaction extends CommonBase { */ public byte[] get_sighash_all(byte[] funding_redeemscript, long channel_value_satoshis) { byte[] ret = bindings.TrustedClosingTransaction_get_sighash_all(this.ptr, funding_redeemscript, channel_value_satoshis); + Reference.reachabilityFence(this); + Reference.reachabilityFence(funding_redeemscript); + Reference.reachabilityFence(channel_value_satoshis); return ret; } @@ -47,7 +52,11 @@ public class TrustedClosingTransaction extends CommonBase { * because we are about to broadcast a holder transaction. */ public byte[] sign(byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis) { - byte[] ret = bindings.TrustedClosingTransaction_sign(this.ptr, funding_key, funding_redeemscript, channel_value_satoshis); + byte[] ret = bindings.TrustedClosingTransaction_sign(this.ptr, InternalUtils.check_arr_len(funding_key, 32), funding_redeemscript, channel_value_satoshis); + Reference.reachabilityFence(this); + Reference.reachabilityFence(funding_key); + Reference.reachabilityFence(funding_redeemscript); + Reference.reachabilityFence(channel_value_satoshis); return ret; }