- long ret = bindings.ShutdownScript_new_p2wpkh(pubkey_hash);
- if (ret >= 0 && ret < 1024) { return null; }
- ShutdownScript ret_hu_conv = new ShutdownScript(null, ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ long ret = bindings.ShutdownScript_new_p2wpkh(InternalUtils.check_arr_len(pubkey_hash, 20));
+ Reference.reachabilityFence(pubkey_hash);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ShutdownScript ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ShutdownScript(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };