LDKOutPoint a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = OutPoint_clone(&a_conv);
ret->a = a_conv;
LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
FREE((void*)b);
LDKChannelAnnouncement a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = ChannelAnnouncement_clone(&a_conv);
ret->a = a_conv;
LDKChannelUpdate b_conv;
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
+ if (b_conv.inner != NULL)
+ b_conv = ChannelUpdate_clone(&b_conv);
ret->b = b_conv;
LDKChannelUpdate c_conv;
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
+ if (c_conv.inner != NULL)
+ c_conv = ChannelUpdate_clone(&c_conv);
ret->c = c_conv;
return (long)ret;
}
LDKHTLCOutputInCommitment a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = HTLCOutputInCommitment_clone(&a_conv);
ret->a = a_conv;
LDKSignature b_conv = *(LDKSignature*)b;
FREE((void*)b);
LDKHTLCOutputInCommitment arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = HTLCOutputInCommitment_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = (void*)(funding_txo & (~1));
funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+ if (funding_txo_conv.inner != NULL)
+ funding_txo_conv = OutPoint_clone(&funding_txo_conv);
LDKChannelMonitor monitor_conv;
monitor_conv.inner = (void*)(monitor & (~1));
monitor_conv.is_owned = (monitor & 1) || (monitor == 0);
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = (void*)(funding_txo & (~1));
funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+ if (funding_txo_conv.inner != NULL)
+ funding_txo_conv = OutPoint_clone(&funding_txo_conv);
LDKChannelMonitorUpdate update_conv;
update_conv.inner = (void*)(update & (~1));
update_conv.is_owned = (update & 1) || (update == 0);
+ if (update_conv.inner != NULL)
+ update_conv = ChannelMonitorUpdate_clone(&update_conv);
LDKCResult_NoneChannelMonitorUpdateErrZ* ret = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
*ret = (arg_conv->update_channel)(arg_conv->this_arg, funding_txo_conv, update_conv);
return (long)ret;
LDKUpdateAddHTLC arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = UpdateAddHTLC_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKUpdateFulfillHTLC arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = UpdateFulfillHTLC_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKUpdateFailHTLC arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = UpdateFailHTLC_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKUpdateFailMalformedHTLC arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = UpdateFailMalformedHTLC_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKNodeAnnouncement arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKRouteHop arr_elem_conv;
arr_elem_conv.inner = (void*)(arr_elem & (~1));
arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+ if (arr_elem_conv.inner != NULL)
+ arr_elem_conv = RouteHop_clone(&arr_elem_conv);
ret->data[i] = arr_elem_conv;
}
(*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
LDKOutPoint a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = OutPoint_clone(&a_conv);
LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b;
FREE((void*)b);
LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
LDKChannelAnnouncement a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = ChannelAnnouncement_clone(&a_conv);
LDKChannelUpdate b_conv;
b_conv.inner = (void*)(b & (~1));
b_conv.is_owned = (b & 1) || (b == 0);
+ if (b_conv.inner != NULL)
+ b_conv = ChannelUpdate_clone(&b_conv);
LDKChannelUpdate c_conv;
c_conv.inner = (void*)(c & (~1));
c_conv.is_owned = (c & 1) || (c == 0);
+ if (c_conv.inner != NULL)
+ c_conv = ChannelUpdate_clone(&c_conv);
LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
*ret = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
return (long)ret;
LDKHTLCOutputInCommitment a_conv;
a_conv.inner = (void*)(a & (~1));
a_conv.is_owned = (a & 1) || (a == 0);
+ if (a_conv.inner != NULL)
+ a_conv = HTLCOutputInCommitment_clone(&a_conv);
LDKSignature b_conv = *(LDKSignature*)b;
FREE((void*)b);
LDKC2Tuple_HTLCOutputInCommitmentSignatureZ* ret = MALLOC(sizeof(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ), "LDKC2Tuple_HTLCOutputInCommitmentSignatureZ");
LDKChannelHandshakeConfig val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = ChannelHandshakeConfig_clone(&val_conv);
return UserConfig_set_own_channel_config(&this_ptr_conv, val_conv);
}
LDKChannelHandshakeLimits val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = ChannelHandshakeLimits_clone(&val_conv);
return UserConfig_set_peer_channel_config_limits(&this_ptr_conv, val_conv);
}
LDKChannelConfig val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = ChannelConfig_clone(&val_conv);
return UserConfig_set_channel_options(&this_ptr_conv, val_conv);
}
LDKChannelHandshakeConfig own_channel_config_arg_conv;
own_channel_config_arg_conv.inner = (void*)(own_channel_config_arg & (~1));
own_channel_config_arg_conv.is_owned = (own_channel_config_arg & 1) || (own_channel_config_arg == 0);
+ if (own_channel_config_arg_conv.inner != NULL)
+ own_channel_config_arg_conv = ChannelHandshakeConfig_clone(&own_channel_config_arg_conv);
LDKChannelHandshakeLimits peer_channel_config_limits_arg_conv;
peer_channel_config_limits_arg_conv.inner = (void*)(peer_channel_config_limits_arg & (~1));
peer_channel_config_limits_arg_conv.is_owned = (peer_channel_config_limits_arg & 1) || (peer_channel_config_limits_arg == 0);
+ if (peer_channel_config_limits_arg_conv.inner != NULL)
+ peer_channel_config_limits_arg_conv = ChannelHandshakeLimits_clone(&peer_channel_config_limits_arg_conv);
LDKChannelConfig channel_options_arg_conv;
channel_options_arg_conv.inner = (void*)(channel_options_arg & (~1));
channel_options_arg_conv.is_owned = (channel_options_arg & 1) || (channel_options_arg == 0);
+ if (channel_options_arg_conv.inner != NULL)
+ channel_options_arg_conv = ChannelConfig_clone(&channel_options_arg_conv);
LDKUserConfig ret = UserConfig_new(own_channel_config_arg_conv, peer_channel_config_limits_arg_conv, channel_options_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKChannelMonitorUpdate updates_conv;
updates_conv.inner = (void*)(updates & (~1));
updates_conv.is_owned = (updates & 1) || (updates == 0);
+ if (updates_conv.inner != NULL)
+ updates_conv = ChannelMonitorUpdate_clone(&updates_conv);
LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster;
LDKLogger* logger_conv = (LDKLogger*)logger;
LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
LDKUserConfig config_conv;
config_conv.inner = (void*)(config & (~1));
config_conv.is_owned = (config & 1) || (config == 0);
+ if (config_conv.inner != NULL)
+ config_conv = UserConfig_clone(&config_conv);
LDKChannelManager ret = ChannelManager_new(network_conv, fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKUserConfig override_config_conv;
override_config_conv.inner = (void*)(override_config & (~1));
override_config_conv.is_owned = (override_config & 1) || (override_config == 0);
+ if (override_config_conv.inner != NULL)
+ override_config_conv = UserConfig_clone(&override_config_conv);
LDKCResult_NoneAPIErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
*ret = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_id, override_config_conv);
return (long)ret;
LDKOutPoint funding_txo_conv;
funding_txo_conv.inner = (void*)(funding_txo & (~1));
funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+ if (funding_txo_conv.inner != NULL)
+ funding_txo_conv = OutPoint_clone(&funding_txo_conv);
return ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, funding_txo_conv);
}
LDKUserConfig val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = UserConfig_clone(&val_conv);
return ChannelManagerReadArgs_set_default_config(&this_ptr_conv, val_conv);
}
LDKUserConfig default_config_conv;
default_config_conv.inner = (void*)(default_config & (~1));
default_config_conv.is_owned = (default_config & 1) || (default_config == 0);
+ if (default_config_conv.inner != NULL)
+ default_config_conv = UserConfig_clone(&default_config_conv);
LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors;
FREE((void*)channel_monitors);
LDKChannelManagerReadArgs ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv);
LDKUnsignedNodeAnnouncement val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = UnsignedNodeAnnouncement_clone(&val_conv);
return NodeAnnouncement_set_contents(&this_ptr_conv, val_conv);
}
LDKUnsignedNodeAnnouncement contents_arg_conv;
contents_arg_conv.inner = (void*)(contents_arg & (~1));
contents_arg_conv.is_owned = (contents_arg & 1) || (contents_arg == 0);
+ if (contents_arg_conv.inner != NULL)
+ contents_arg_conv = UnsignedNodeAnnouncement_clone(&contents_arg_conv);
LDKNodeAnnouncement ret = NodeAnnouncement_new(signature_arg_conv, contents_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKUnsignedChannelAnnouncement val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = UnsignedChannelAnnouncement_clone(&val_conv);
return ChannelAnnouncement_set_contents(&this_ptr_conv, val_conv);
}
LDKUnsignedChannelAnnouncement contents_arg_conv;
contents_arg_conv.inner = (void*)(contents_arg & (~1));
contents_arg_conv.is_owned = (contents_arg & 1) || (contents_arg == 0);
+ if (contents_arg_conv.inner != NULL)
+ contents_arg_conv = UnsignedChannelAnnouncement_clone(&contents_arg_conv);
LDKChannelAnnouncement ret = ChannelAnnouncement_new(node_signature_1_arg_conv, node_signature_2_arg_conv, bitcoin_signature_1_arg_conv, bitcoin_signature_2_arg_conv, contents_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKUnsignedChannelUpdate val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = UnsignedChannelUpdate_clone(&val_conv);
return ChannelUpdate_set_contents(&this_ptr_conv, val_conv);
}
LDKUnsignedChannelUpdate contents_arg_conv;
contents_arg_conv.inner = (void*)(contents_arg & (~1));
contents_arg_conv.is_owned = (contents_arg & 1) || (contents_arg == 0);
+ if (contents_arg_conv.inner != NULL)
+ contents_arg_conv = UnsignedChannelUpdate_clone(&contents_arg_conv);
LDKChannelUpdate ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKUpdateFee val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = UpdateFee_clone(&val_conv);
return CommitmentUpdate_set_update_fee(&this_ptr_conv, val_conv);
}
LDKCommitmentSigned val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = CommitmentSigned_clone(&val_conv);
return CommitmentUpdate_set_commitment_signed(&this_ptr_conv, val_conv);
}
LDKUpdateFee update_fee_arg_conv;
update_fee_arg_conv.inner = (void*)(update_fee_arg & (~1));
update_fee_arg_conv.is_owned = (update_fee_arg & 1) || (update_fee_arg == 0);
+ if (update_fee_arg_conv.inner != NULL)
+ update_fee_arg_conv = UpdateFee_clone(&update_fee_arg_conv);
LDKCommitmentSigned commitment_signed_arg_conv;
commitment_signed_arg_conv.inner = (void*)(commitment_signed_arg & (~1));
commitment_signed_arg_conv.is_owned = (commitment_signed_arg & 1) || (commitment_signed_arg == 0);
+ if (commitment_signed_arg_conv.inner != NULL)
+ commitment_signed_arg_conv = CommitmentSigned_clone(&commitment_signed_arg_conv);
LDKCommitmentUpdate ret = CommitmentUpdate_new(update_add_htlcs_arg_conv, update_fulfill_htlcs_arg_conv, update_fail_htlcs_arg_conv, update_fail_malformed_htlcs_arg_conv, update_fee_arg_conv, commitment_signed_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKTxCreationKeys keys_conv;
keys_conv.inner = (void*)(keys & (~1));
keys_conv.is_owned = (keys & 1) || (keys == 0);
+ if (keys_conv.inner != NULL)
+ keys_conv = TxCreationKeys_clone(&keys_conv);
LDKPreCalculatedTxCreationKeys ret = PreCalculatedTxCreationKeys_new(keys_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKTxCreationKeys keys_conv;
keys_conv.inner = (void*)(keys & (~1));
keys_conv.is_owned = (keys & 1) || (keys == 0);
+ if (keys_conv.inner != NULL)
+ keys_conv = TxCreationKeys_clone(&keys_conv);
LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data;
FREE((void*)htlc_data);
LDKHolderCommitmentTransaction ret = HolderCommitmentTransaction_new_missing_holder_sig(unsigned_tx_conv, counterparty_sig_conv, holder_funding_key_ref, counterparty_funding_key_ref, keys_conv, feerate_per_kw, htlc_data_conv);
LDKRoutingFees val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = RoutingFees_clone(&val_conv);
return RouteHint_set_fees(&this_ptr_conv, val_conv);
}
LDKRoutingFees fees_arg_conv;
fees_arg_conv.inner = (void*)(fees_arg & (~1));
fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
+ if (fees_arg_conv.inner != NULL)
+ fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
LDKRouteHint ret = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKChannelUpdate val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = ChannelUpdate_clone(&val_conv);
return DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
}
LDKChannelAnnouncement val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = ChannelAnnouncement_clone(&val_conv);
return ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
}
LDKNodeAnnouncement val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = NodeAnnouncement_clone(&val_conv);
return NodeAnnouncementInfo_set_announcement_message(&this_ptr_conv, val_conv);
}
LDKNodeAnnouncement announcement_message_arg_conv;
announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
announcement_message_arg_conv.is_owned = (announcement_message_arg & 1) || (announcement_message_arg == 0);
+ if (announcement_message_arg_conv.inner != NULL)
+ announcement_message_arg_conv = NodeAnnouncement_clone(&announcement_message_arg_conv);
LDKNodeAnnouncementInfo ret = NodeAnnouncementInfo_new(features_arg_conv, last_update_arg, rgb_arg_conv, alias_arg_ref, addresses_arg_conv, announcement_message_arg_conv);
return ((long)ret.inner) | (ret.is_owned ? 1 : 0);
}
LDKRoutingFees val_conv;
val_conv.inner = (void*)(val & (~1));
val_conv.is_owned = (val & 1) || (val == 0);
+ if (val_conv.inner != NULL)
+ val_conv = RoutingFees_clone(&val_conv);
return NodeInfo_set_lowest_inbound_channel_fees(&this_ptr_conv, val_conv);
}
LDKRoutingFees lowest_inbound_channel_fees_arg_conv;
lowest_inbound_channel_fees_arg_conv.inner = (void*)(lowest_inbound_channel_fees_arg & (~1));
lowest_inbound_channel_fees_arg_conv.is_owned = (lowest_inbound_channel_fees_arg & 1) || (lowest_inbound_channel_fees_arg == 0);
+ if (lowest_inbound_channel_fees_arg_conv.inner != NULL)
+ lowest_inbound_channel_fees_arg_conv = RoutingFees_clone(&lowest_inbound_channel_fees_arg_conv);
LDKNodeAnnouncementInfo announcement_info_arg_conv;
announcement_info_arg_conv.inner = (void*)(announcement_info_arg & (~1));
announcement_info_arg_conv.is_owned = (announcement_info_arg & 1) || (announcement_info_arg == 0);