From 32692e00046b7ec16b6a2e20bd54800b2b48d4c0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 10 Oct 2021 00:53:57 +0000 Subject: [PATCH] Update auto-generated bindings --- src/main/java/org/ldk/structs/APIError.java | 14 +++---- .../java/org/ldk/structs/AcceptChannel.java | 4 +- src/main/java/org/ldk/structs/Access.java | 2 +- .../ldk/structs/AnnouncementSignatures.java | 6 +-- .../org/ldk/structs/BackgroundProcessor.java | 6 +-- src/main/java/org/ldk/structs/Balance.java | 10 ++--- src/main/java/org/ldk/structs/BaseSign.java | 20 +++++----- src/main/java/org/ldk/structs/BestBlock.java | 6 +-- .../structs/BuiltCommitmentTransaction.java | 6 +-- .../java/org/ldk/structs/ChainMonitor.java | 10 ++--- .../java/org/ldk/structs/ChainParameters.java | 6 +-- .../org/ldk/structs/ChannelAnnouncement.java | 8 ++-- .../java/org/ldk/structs/ChannelConfig.java | 8 ++-- .../org/ldk/structs/ChannelCounterparty.java | 8 ++-- .../java/org/ldk/structs/ChannelDetails.java | 16 ++++---- .../java/org/ldk/structs/ChannelFeatures.java | 8 ++-- .../ldk/structs/ChannelHandshakeConfig.java | 6 +-- .../ldk/structs/ChannelHandshakeLimits.java | 6 +-- .../java/org/ldk/structs/ChannelInfo.java | 16 ++++---- .../java/org/ldk/structs/ChannelManager.java | 34 ++++++++-------- .../ldk/structs/ChannelManagerPersister.java | 2 +- .../ldk/structs/ChannelManagerReadArgs.java | 14 +++---- .../java/org/ldk/structs/ChannelMonitor.java | 8 ++-- .../org/ldk/structs/ChannelMonitorUpdate.java | 4 +- .../org/ldk/structs/ChannelPublicKeys.java | 6 +-- .../org/ldk/structs/ChannelReestablish.java | 4 +- .../structs/ChannelTransactionParameters.java | 16 ++++---- .../java/org/ldk/structs/ChannelUpdate.java | 8 ++-- .../java/org/ldk/structs/ClosingSigned.java | 8 ++-- .../ldk/structs/ClosingSignedFeeRange.java | 6 +-- .../org/ldk/structs/ClosingTransaction.java | 6 +-- .../java/org/ldk/structs/ClosureReason.java | 16 ++++---- .../org/ldk/structs/CommitmentSigned.java | 6 +-- .../ldk/structs/CommitmentTransaction.java | 8 ++-- .../org/ldk/structs/CommitmentUpdate.java | 8 ++-- src/main/java/org/ldk/structs/CommonBase.java | 2 +- ...nterpartyChannelTransactionParameters.java | 8 ++-- .../structs/CounterpartyForwardingInfo.java | 4 +- .../org/ldk/structs/CustomMessageHandler.java | 2 +- .../org/ldk/structs/CustomMessageReader.java | 2 +- .../java/org/ldk/structs/DataLossProtect.java | 4 +- .../java/org/ldk/structs/DecodeError.java | 2 +- .../DelayedPaymentOutputDescriptor.java | 8 ++-- .../java/org/ldk/structs/Description.java | 4 +- .../DirectedChannelTransactionParameters.java | 6 +-- .../ldk/structs/DirectionalChannelInfo.java | 12 +++--- .../java/org/ldk/structs/ErrorAction.java | 10 ++--- .../java/org/ldk/structs/ErrorMessage.java | 6 +-- .../ldk/structs/ErroringMessageHandler.java | 6 +-- src/main/java/org/ldk/structs/Event.java | 18 ++++----- src/main/java/org/ldk/structs/ExpiryTime.java | 6 +-- src/main/java/org/ldk/structs/Fallback.java | 8 ++-- .../org/ldk/structs/FilesystemPersister.java | 6 +-- src/main/java/org/ldk/structs/Filter.java | 2 +- .../java/org/ldk/structs/FundingCreated.java | 6 +-- .../java/org/ldk/structs/FundingLocked.java | 6 +-- .../java/org/ldk/structs/FundingSigned.java | 6 +-- .../ldk/structs/GossipTimestampFilter.java | 6 +-- .../ldk/structs/HTLCOutputInCommitment.java | 8 ++-- src/main/java/org/ldk/structs/HTLCUpdate.java | 4 +- .../structs/HolderCommitmentTransaction.java | 6 +-- .../ldk/structs/IgnoringMessageHandler.java | 10 ++--- .../java/org/ldk/structs/InMemorySigner.java | 20 +++++----- src/main/java/org/ldk/structs/Init.java | 8 ++-- .../java/org/ldk/structs/InitFeatures.java | 8 ++-- .../ldk/structs/InvalidShutdownScript.java | 2 +- src/main/java/org/ldk/structs/Invoice.java | 14 +++---- .../java/org/ldk/structs/InvoiceFeatures.java | 8 ++-- .../org/ldk/structs/InvoiceSignature.java | 2 +- .../java/org/ldk/structs/KeysInterface.java | 8 ++-- .../java/org/ldk/structs/KeysManager.java | 8 ++-- .../java/org/ldk/structs/LightningError.java | 6 +-- .../java/org/ldk/structs/MessageHandler.java | 6 +-- .../org/ldk/structs/MessageSendEvent.java | 40 +++++++++---------- .../org/ldk/structs/MinFinalCltvExpiry.java | 2 +- .../java/org/ldk/structs/MonitorEvent.java | 6 +-- .../org/ldk/structs/MonitorUpdateError.java | 2 +- src/main/java/org/ldk/structs/NetAddress.java | 12 +++--- .../org/ldk/structs/NetGraphMsgHandler.java | 10 ++--- .../java/org/ldk/structs/NetworkGraph.java | 20 +++++----- .../java/org/ldk/structs/NetworkUpdate.java | 8 ++-- .../org/ldk/structs/NodeAnnouncement.java | 8 ++-- .../org/ldk/structs/NodeAnnouncementInfo.java | 10 ++--- .../java/org/ldk/structs/NodeFeatures.java | 8 ++-- src/main/java/org/ldk/structs/NodeInfo.java | 10 ++--- .../java/org/ldk/structs/OpenChannel.java | 4 +- .../java/org/ldk/structs/Option_AccessZ.java | 4 +- .../Option_C2Tuple_usizeTransactionZZ.java | 6 +-- .../java/org/ldk/structs/Option_FilterZ.java | 4 +- .../ldk/structs/Option_NetworkUpdateZ.java | 6 +-- .../java/org/ldk/structs/Option_TypeZ.java | 6 +-- .../java/org/ldk/structs/Option_u16Z.java | 6 +-- .../java/org/ldk/structs/Option_u32Z.java | 6 +-- .../java/org/ldk/structs/Option_u64Z.java | 6 +-- src/main/java/org/ldk/structs/OutPoint.java | 6 +-- .../java/org/ldk/structs/PayeePubKey.java | 2 +- .../java/org/ldk/structs/PaymentPurpose.java | 6 +-- .../org/ldk/structs/PaymentSendFailure.java | 10 ++--- .../java/org/ldk/structs/PeerHandleError.java | 4 +- .../java/org/ldk/structs/PeerManager.java | 10 ++--- src/main/java/org/ldk/structs/Persist.java | 4 +- src/main/java/org/ldk/structs/Ping.java | 6 +-- src/main/java/org/ldk/structs/Pong.java | 6 +-- .../org/ldk/structs/PositiveTimestamp.java | 6 +-- .../java/org/ldk/structs/PrivateRoute.java | 6 +-- .../org/ldk/structs/QueryChannelRange.java | 6 +-- .../org/ldk/structs/QueryShortChannelIds.java | 6 +-- .../java/org/ldk/structs/RawDataPart.java | 4 +- src/main/java/org/ldk/structs/RawInvoice.java | 20 +++++----- .../org/ldk/structs/ReplyChannelRange.java | 6 +-- .../ldk/structs/ReplyShortChannelIdsEnd.java | 6 +-- .../Result_AcceptChannelDecodeErrorZ.java | 6 +-- ...lt_AnnouncementSignaturesDecodeErrorZ.java | 6 +-- ...uiltCommitmentTransactionDecodeErrorZ.java | 6 +-- ..._BlockHashChannelManagerZDecodeErrorZ.java | 4 +- ..._BlockHashChannelMonitorZDecodeErrorZ.java | 6 +-- ...2Tuple_SignatureCVec_SignatureZZNoneZ.java | 6 +-- .../Result_COption_TypeZDecodeErrorZ.java | 6 +-- ...ult_CResult_NetAddressu8ZDecodeErrorZ.java | 6 +-- ...Tuple_BlockHashChannelMonitorZZErrorZ.java | 6 +-- .../structs/Result_CVec_CVec_u8ZZNoneZ.java | 6 +-- .../structs/Result_CVec_SignatureZNoneZ.java | 6 +-- .../Result_CVec_u8ZPeerHandleErrorZ.java | 6 +-- ...esult_ChannelAnnouncementDecodeErrorZ.java | 6 +-- .../Result_ChannelConfigDecodeErrorZ.java | 6 +-- .../Result_ChannelFeaturesDecodeErrorZ.java | 4 +- .../Result_ChannelInfoDecodeErrorZ.java | 6 +-- ...sult_ChannelMonitorUpdateDecodeErrorZ.java | 6 +-- .../Result_ChannelPublicKeysDecodeErrorZ.java | 6 +-- ...Result_ChannelReestablishDecodeErrorZ.java | 6 +-- ...nnelTransactionParametersDecodeErrorZ.java | 6 +-- .../Result_ChannelUpdateDecodeErrorZ.java | 6 +-- .../Result_ClosingSignedDecodeErrorZ.java | 6 +-- ...ult_ClosingSignedFeeRangeDecodeErrorZ.java | 6 +-- .../Result_CommitmentSignedDecodeErrorZ.java | 6 +-- ...ult_CommitmentTransactionDecodeErrorZ.java | 6 +-- ...nnelTransactionParametersDecodeErrorZ.java | 6 +-- ...edPaymentOutputDescriptorDecodeErrorZ.java | 6 +-- .../Result_DescriptionCreationErrorZ.java | 6 +-- ...lt_DirectionalChannelInfoDecodeErrorZ.java | 6 +-- .../Result_ErrorMessageDecodeErrorZ.java | 6 +-- .../Result_ExpiryTimeCreationErrorZ.java | 6 +-- .../Result_FundingCreatedDecodeErrorZ.java | 6 +-- .../Result_FundingLockedDecodeErrorZ.java | 6 +-- .../Result_FundingSignedDecodeErrorZ.java | 6 +-- ...ult_GossipTimestampFilterDecodeErrorZ.java | 6 +-- ...lt_HTLCOutputInCommitmentDecodeErrorZ.java | 6 +-- .../Result_HTLCUpdateDecodeErrorZ.java | 6 +-- ...lderCommitmentTransactionDecodeErrorZ.java | 6 +-- .../Result_InMemorySignerDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_InitDecodeErrorZ.java | 6 +-- .../Result_InitFeaturesDecodeErrorZ.java | 4 +- .../Result_InvoiceFeaturesDecodeErrorZ.java | 4 +- .../org/ldk/structs/Result_InvoiceNoneZ.java | 6 +-- .../structs/Result_InvoiceSemanticErrorZ.java | 6 +-- .../Result_InvoiceSignOrCreationErrorZ.java | 6 +-- .../Result_NetAddressDecodeErrorZ.java | 6 +-- .../org/ldk/structs/Result_NetAddressu8Z.java | 6 +-- .../Result_NetworkGraphDecodeErrorZ.java | 6 +-- .../Result_NodeAnnouncementDecodeErrorZ.java | 6 +-- ...sult_NodeAnnouncementInfoDecodeErrorZ.java | 6 +-- .../Result_NodeFeaturesDecodeErrorZ.java | 4 +- .../structs/Result_NodeInfoDecodeErrorZ.java | 6 +-- .../org/ldk/structs/Result_NoneAPIErrorZ.java | 6 +-- .../Result_NoneChannelMonitorUpdateErrZ.java | 6 +-- .../org/ldk/structs/Result_NoneErrorZ.java | 6 +-- .../structs/Result_NoneLightningErrorZ.java | 6 +-- .../Result_NoneMonitorUpdateErrorZ.java | 6 +-- .../org/ldk/structs/Result_NoneNoneZ.java | 6 +-- .../Result_NonePaymentSendFailureZ.java | 6 +-- .../structs/Result_NonePeerHandleErrorZ.java | 6 +-- .../structs/Result_NoneSemanticErrorZ.java | 6 +-- .../Result_OpenChannelDecodeErrorZ.java | 6 +-- .../structs/Result_OutPointDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_PayeePubKeyErrorZ.java | 6 +-- ...Result_PaymentHashPaymentSendFailureZ.java | 6 +-- .../Result_PaymentSecretAPIErrorZ.java | 6 +-- .../ldk/structs/Result_PingDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_PongDecodeErrorZ.java | 6 +-- ...esult_PositiveTimestampCreationErrorZ.java | 6 +-- .../Result_PrivateRouteCreationErrorZ.java | 6 +-- .../ldk/structs/Result_PublicKeyErrorZ.java | 6 +-- .../Result_QueryChannelRangeDecodeErrorZ.java | 6 +-- ...sult_QueryShortChannelIdsDecodeErrorZ.java | 6 +-- .../Result_RecoverableSignatureNoneZ.java | 6 +-- .../Result_ReplyChannelRangeDecodeErrorZ.java | 6 +-- ...t_ReplyShortChannelIdsEndDecodeErrorZ.java | 6 +-- .../Result_RevokeAndACKDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_RouteDecodeErrorZ.java | 6 +-- .../structs/Result_RouteHopDecodeErrorZ.java | 6 +-- .../structs/Result_RouteLightningErrorZ.java | 6 +-- .../Result_RoutingFeesDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_SecretKeyErrorZ.java | 4 +- .../structs/Result_ShutdownDecodeErrorZ.java | 6 +-- .../Result_ShutdownScriptDecodeErrorZ.java | 6 +-- ..._ShutdownScriptInvalidShutdownScriptZ.java | 4 +- .../org/ldk/structs/Result_SiPrefixNoneZ.java | 6 +-- .../ldk/structs/Result_SignDecodeErrorZ.java | 6 +-- .../ldk/structs/Result_SignatureNoneZ.java | 6 +-- .../structs/Result_SignedRawInvoiceNoneZ.java | 6 +-- ...SpendableOutputDescriptorDecodeErrorZ.java | 6 +-- ...icPaymentOutputDescriptorDecodeErrorZ.java | 6 +-- .../org/ldk/structs/Result_StringErrorZ.java | 4 +- .../ldk/structs/Result_TransactionNoneZ.java | 6 +-- ...Result_TrustedClosingTransactionNoneZ.java | 4 +- ...ult_TrustedCommitmentTransactionNoneZ.java | 4 +- .../Result_TxCreationKeysDecodeErrorZ.java | 6 +-- .../structs/Result_TxCreationKeysErrorZ.java | 6 +-- .../ldk/structs/Result_TxOutAccessErrorZ.java | 6 +-- ...signedChannelAnnouncementDecodeErrorZ.java | 6 +-- ...ult_UnsignedChannelUpdateDecodeErrorZ.java | 6 +-- ..._UnsignedNodeAnnouncementDecodeErrorZ.java | 6 +-- .../Result_UpdateAddHTLCDecodeErrorZ.java | 6 +-- .../Result_UpdateFailHTLCDecodeErrorZ.java | 6 +-- ...t_UpdateFailMalformedHTLCDecodeErrorZ.java | 6 +-- .../structs/Result_UpdateFeeDecodeErrorZ.java | 6 +-- .../Result_UpdateFulfillHTLCDecodeErrorZ.java | 6 +-- .../structs/Result_boolLightningErrorZ.java | 6 +-- .../structs/Result_boolPeerHandleErrorZ.java | 6 +-- .../java/org/ldk/structs/RevokeAndACK.java | 6 +-- src/main/java/org/ldk/structs/Route.java | 6 +-- src/main/java/org/ldk/structs/RouteHint.java | 2 +- .../java/org/ldk/structs/RouteHintHop.java | 10 ++--- src/main/java/org/ldk/structs/RouteHop.java | 10 ++--- .../java/org/ldk/structs/RoutingFees.java | 6 +-- .../ldk/structs/RoutingMessageHandler.java | 14 +++---- src/main/java/org/ldk/structs/Sha256.java | 2 +- src/main/java/org/ldk/structs/Shutdown.java | 6 +-- .../java/org/ldk/structs/ShutdownScript.java | 14 +++---- src/main/java/org/ldk/structs/Sign.java | 2 +- .../org/ldk/structs/SignOrCreationError.java | 6 +-- .../org/ldk/structs/SignedRawInvoice.java | 12 +++--- .../org/ldk/structs/SocketDescriptor.java | 2 +- .../structs/SpendableOutputDescriptor.java | 10 ++--- .../StaticPaymentOutputDescriptor.java | 8 ++-- .../structs/TrustedCommitmentTransaction.java | 6 +-- .../TwoTuple_BlockHashChannelManagerZ.java | 4 +- .../TwoTuple_BlockHashChannelMonitorZ.java | 6 +-- .../ldk/structs/TwoTuple_OutPointScriptZ.java | 6 +-- .../TwoTuple_PaymentHashPaymentSecretZ.java | 4 +- .../ldk/structs/TwoTuple_PublicKeyTypeZ.java | 6 +-- .../TwoTuple_SignatureCVec_SignatureZZ.java | 4 +- ...woTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java | 4 +- ...TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java | 4 +- .../org/ldk/structs/TwoTuple_u32ScriptZ.java | 4 +- .../org/ldk/structs/TwoTuple_u32TxOutZ.java | 6 +-- .../structs/TwoTuple_usizeTransactionZ.java | 4 +- .../java/org/ldk/structs/TxCreationKeys.java | 10 ++--- src/main/java/org/ldk/structs/Type.java | 2 +- .../structs/UnsignedChannelAnnouncement.java | 6 +-- .../ldk/structs/UnsignedChannelUpdate.java | 4 +- .../ldk/structs/UnsignedNodeAnnouncement.java | 6 +-- .../java/org/ldk/structs/UpdateAddHTLC.java | 4 +- .../java/org/ldk/structs/UpdateFailHTLC.java | 4 +- .../ldk/structs/UpdateFailMalformedHTLC.java | 4 +- src/main/java/org/ldk/structs/UpdateFee.java | 6 +-- .../org/ldk/structs/UpdateFulfillHTLC.java | 6 +-- src/main/java/org/ldk/structs/UserConfig.java | 12 +++--- .../java/org/ldk/structs/UtilMethods.java | 24 +++++------ src/main/java/org/ldk/structs/Watch.java | 4 +- .../java/org/ldk/structs/WatchedOutput.java | 6 +-- ts/bindings.c | 2 +- ts/bindings.c.body | 2 +- 263 files changed, 890 insertions(+), 890 deletions(-) diff --git a/src/main/java/org/ldk/structs/APIError.java b/src/main/java/org/ldk/structs/APIError.java index 008b99f5..d82d0a5a 100644 --- a/src/main/java/org/ldk/structs/APIError.java +++ b/src/main/java/org/ldk/structs/APIError.java @@ -110,7 +110,7 @@ public class APIError extends CommonBase { */ public APIError clone() { long ret = bindings.APIError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -121,7 +121,7 @@ public class APIError extends CommonBase { */ public static APIError apimisuse_error(java.lang.String err) { long ret = bindings.APIError_apimisuse_error(err); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -132,7 +132,7 @@ public class APIError extends CommonBase { */ public static APIError fee_rate_too_high(java.lang.String err, int feerate) { long ret = bindings.APIError_fee_rate_too_high(err, feerate); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -143,7 +143,7 @@ public class APIError extends CommonBase { */ public static APIError route_error(java.lang.String err) { long ret = bindings.APIError_route_error(err); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -154,7 +154,7 @@ public class APIError extends CommonBase { */ public static APIError channel_unavailable(java.lang.String err) { long ret = bindings.APIError_channel_unavailable(err); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -165,7 +165,7 @@ public class APIError extends CommonBase { */ public static APIError monitor_update_failed() { long ret = bindings.APIError_monitor_update_failed(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -176,7 +176,7 @@ public class APIError extends CommonBase { */ public static APIError incompatible_shutdown_script(ShutdownScript script) { long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } APIError ret_hu_conv = APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/AcceptChannel.java b/src/main/java/org/ldk/structs/AcceptChannel.java index e4286b23..78a390bc 100644 --- a/src/main/java/org/ldk/structs/AcceptChannel.java +++ b/src/main/java/org/ldk/structs/AcceptChannel.java @@ -234,7 +234,7 @@ public class AcceptChannel extends CommonBase { */ public AcceptChannel clone() { long ret = bindings.AcceptChannel_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } AcceptChannel ret_hu_conv = new AcceptChannel(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -253,7 +253,7 @@ public class AcceptChannel extends CommonBase { */ public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) { long ret = bindings.AcceptChannel_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Access.java b/src/main/java/org/ldk/structs/Access.java index b52d295c..6a52297e 100644 --- a/src/main/java/org/ldk/structs/Access.java +++ b/src/main/java/org/ldk/structs/Access.java @@ -55,7 +55,7 @@ public class Access extends CommonBase { */ public Result_TxOutAccessErrorZ get_utxo(byte[] genesis_hash, long short_channel_id) { long ret = bindings.Access_get_utxo(this.ptr, genesis_hash, short_channel_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/AnnouncementSignatures.java b/src/main/java/org/ldk/structs/AnnouncementSignatures.java index 9b7bfbe8..bdc66667 100644 --- a/src/main/java/org/ldk/structs/AnnouncementSignatures.java +++ b/src/main/java/org/ldk/structs/AnnouncementSignatures.java @@ -84,7 +84,7 @@ public class AnnouncementSignatures extends CommonBase { */ public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) { long ret = bindings.AnnouncementSignatures_new(channel_id_arg, short_channel_id_arg, node_signature_arg, bitcoin_signature_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -95,7 +95,7 @@ public class AnnouncementSignatures extends CommonBase { */ public AnnouncementSignatures clone() { long ret = bindings.AnnouncementSignatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class AnnouncementSignatures extends CommonBase { */ public static Result_AnnouncementSignaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.AnnouncementSignatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/BackgroundProcessor.java b/src/main/java/org/ldk/structs/BackgroundProcessor.java index 0333f93d..3c2af93e 100644 --- a/src/main/java/org/ldk/structs/BackgroundProcessor.java +++ b/src/main/java/org/ldk/structs/BackgroundProcessor.java @@ -79,7 +79,7 @@ public class BackgroundProcessor extends CommonBase { */ public static BackgroundProcessor start(ChannelManagerPersister persister, EventHandler event_handler, ChainMonitor chain_monitor, ChannelManager channel_manager, NetGraphMsgHandler net_graph_msg_handler, PeerManager peer_manager, Logger logger) { long ret = bindings.BackgroundProcessor_start(persister == null ? 0 : persister.ptr, event_handler == null ? 0 : event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr & ~1, channel_manager == null ? 0 : channel_manager.ptr & ~1, net_graph_msg_handler == null ? 0 : net_graph_msg_handler.ptr & ~1, peer_manager == null ? 0 : peer_manager.ptr & ~1, logger == null ? 0 : logger.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BackgroundProcessor ret_hu_conv = new BackgroundProcessor(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(persister); @@ -105,7 +105,7 @@ public class BackgroundProcessor extends CommonBase { */ public Result_NoneErrorZ join() { long ret = bindings.BackgroundProcessor_join(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); this.ptrs_to.add(this); // Due to rust's strict-ownership memory model, in some cases we need to "move" @@ -132,7 +132,7 @@ public class BackgroundProcessor extends CommonBase { */ public Result_NoneErrorZ stop() { long ret = bindings.BackgroundProcessor_stop(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); this.ptrs_to.add(this); // Due to rust's strict-ownership memory model, in some cases we need to "move" diff --git a/src/main/java/org/ldk/structs/Balance.java b/src/main/java/org/ldk/structs/Balance.java index 1a08f911..107c8d09 100644 --- a/src/main/java/org/ldk/structs/Balance.java +++ b/src/main/java/org/ldk/structs/Balance.java @@ -105,7 +105,7 @@ public class Balance extends CommonBase { */ public Balance clone() { long ret = bindings.Balance_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Balance ret_hu_conv = Balance.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -116,7 +116,7 @@ public class Balance extends CommonBase { */ public static Balance claimable_on_channel_close(long claimable_amount_satoshis) { long ret = bindings.Balance_claimable_on_channel_close(claimable_amount_satoshis); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Balance ret_hu_conv = Balance.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -127,7 +127,7 @@ public class Balance extends CommonBase { */ public static Balance claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height) { long ret = bindings.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Balance ret_hu_conv = Balance.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -138,7 +138,7 @@ public class Balance extends CommonBase { */ public static Balance contentious_claimable(long claimable_amount_satoshis, int timeout_height) { long ret = bindings.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Balance ret_hu_conv = Balance.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -149,7 +149,7 @@ public class Balance extends CommonBase { */ public static Balance maybe_claimable_htlcawaiting_timeout(long claimable_amount_satoshis, int claimable_height) { long ret = bindings.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Balance ret_hu_conv = Balance.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/BaseSign.java b/src/main/java/org/ldk/structs/BaseSign.java index 66c12fca..82561db0 100644 --- a/src/main/java/org/ldk/structs/BaseSign.java +++ b/src/main/java/org/ldk/structs/BaseSign.java @@ -299,7 +299,7 @@ public class BaseSign extends CommonBase { */ public Result_NoneNoneZ validate_holder_commitment(HolderCommitmentTransaction holder_tx) { long ret = bindings.BaseSign_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); this.ptrs_to.add(holder_tx); return ret_hu_conv; @@ -325,7 +325,7 @@ public class BaseSign extends CommonBase { */ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx) { long ret = bindings.BaseSign_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(commitment_tx); return ret_hu_conv; @@ -339,7 +339,7 @@ public class BaseSign extends CommonBase { */ public Result_NoneNoneZ validate_counterparty_revocation(long idx, byte[] secret) { long ret = bindings.BaseSign_validate_counterparty_revocation(this.ptr, idx, secret); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -359,7 +359,7 @@ public class BaseSign extends CommonBase { */ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx) { long ret = bindings.BaseSign_sign_holder_commitment_and_htlcs(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(commitment_tx); return ret_hu_conv; @@ -383,7 +383,7 @@ public class BaseSign extends CommonBase { */ public Result_SignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) { long ret = bindings.BaseSign_sign_justice_revoked_output(this.ptr, justice_tx, input, amount, per_commitment_key); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -409,7 +409,7 @@ public class BaseSign extends CommonBase { */ public Result_SignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc) { long ret = bindings.BaseSign_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, per_commitment_key, htlc == null ? 0 : htlc.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); this.ptrs_to.add(htlc); return ret_hu_conv; @@ -436,7 +436,7 @@ public class BaseSign extends CommonBase { */ public Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc) { long ret = bindings.BaseSign_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, per_commitment_point, htlc == null ? 0 : htlc.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); this.ptrs_to.add(htlc); return ret_hu_conv; @@ -450,7 +450,7 @@ public class BaseSign extends CommonBase { */ public Result_SignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx) { long ret = bindings.BaseSign_sign_closing_transaction(this.ptr, closing_tx == null ? 0 : closing_tx.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); this.ptrs_to.add(closing_tx); return ret_hu_conv; @@ -466,7 +466,7 @@ public class BaseSign extends CommonBase { */ public Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) { long ret = bindings.BaseSign_sign_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -495,7 +495,7 @@ public class BaseSign extends CommonBase { */ public ChannelPublicKeys get_pubkeys() { long ret = bindings.BaseSign_get_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/BestBlock.java b/src/main/java/org/ldk/structs/BestBlock.java index 77664b50..9377da15 100644 --- a/src/main/java/org/ldk/structs/BestBlock.java +++ b/src/main/java/org/ldk/structs/BestBlock.java @@ -24,7 +24,7 @@ public class BestBlock extends CommonBase { */ public BestBlock clone() { long ret = bindings.BestBlock_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -36,7 +36,7 @@ public class BestBlock extends CommonBase { */ public static BestBlock from_genesis(org.ldk.enums.Network network) { long ret = bindings.BestBlock_from_genesis(network); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -47,7 +47,7 @@ public class BestBlock extends CommonBase { */ public static BestBlock of(byte[] block_hash, int height) { long ret = bindings.BestBlock_new(block_hash, height); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java b/src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java index 76a15bcc..4921e1eb 100644 --- a/src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java @@ -60,7 +60,7 @@ public class BuiltCommitmentTransaction extends CommonBase { */ public static BuiltCommitmentTransaction of(byte[] transaction_arg, byte[] txid_arg) { long ret = bindings.BuiltCommitmentTransaction_new(transaction_arg, txid_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -71,7 +71,7 @@ public class BuiltCommitmentTransaction extends CommonBase { */ public BuiltCommitmentTransaction clone() { long ret = bindings.BuiltCommitmentTransaction_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -90,7 +90,7 @@ public class BuiltCommitmentTransaction extends CommonBase { */ public static Result_BuiltCommitmentTransactionDecodeErrorZ read(byte[] ser) { long ret = bindings.BuiltCommitmentTransaction_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChainMonitor.java b/src/main/java/org/ldk/structs/ChainMonitor.java index 079e1475..8050ecdf 100644 --- a/src/main/java/org/ldk/structs/ChainMonitor.java +++ b/src/main/java/org/ldk/structs/ChainMonitor.java @@ -38,7 +38,7 @@ public class ChainMonitor extends CommonBase { */ public static ChainMonitor of(Option_FilterZ chain_source, BroadcasterInterface broadcaster, Logger logger, FeeEstimator feeest, Persist persister) { long ret = bindings.ChainMonitor_new(chain_source.ptr, broadcaster == null ? 0 : broadcaster.ptr, logger == null ? 0 : logger.ptr, feeest == null ? 0 : feeest.ptr, persister == null ? 0 : persister.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChainMonitor ret_hu_conv = new ChainMonitor(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(broadcaster); @@ -77,7 +77,7 @@ public class ChainMonitor extends CommonBase { */ public Listen as_Listen() { long ret = bindings.ChainMonitor_as_Listen(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Listen ret_hu_conv = new Listen(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -89,7 +89,7 @@ public class ChainMonitor extends CommonBase { */ public Confirm as_Confirm() { long ret = bindings.ChainMonitor_as_Confirm(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Confirm ret_hu_conv = new Confirm(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -101,7 +101,7 @@ public class ChainMonitor extends CommonBase { */ public Watch as_Watch() { long ret = bindings.ChainMonitor_as_Watch(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Watch ret_hu_conv = new Watch(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -113,7 +113,7 @@ public class ChainMonitor extends CommonBase { */ public EventsProvider as_EventsProvider() { long ret = bindings.ChainMonitor_as_EventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } EventsProvider ret_hu_conv = new EventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChainParameters.java b/src/main/java/org/ldk/structs/ChainParameters.java index 256cf100..48f54722 100644 --- a/src/main/java/org/ldk/structs/ChainParameters.java +++ b/src/main/java/org/ldk/structs/ChainParameters.java @@ -45,7 +45,7 @@ public class ChainParameters extends CommonBase { */ public BestBlock get_best_block() { long ret = bindings.ChainParameters_get_best_block(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -65,7 +65,7 @@ public class ChainParameters extends CommonBase { */ public static ChainParameters of(org.ldk.enums.Network network_arg, BestBlock best_block_arg) { long ret = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0 : best_block_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChainParameters ret_hu_conv = new ChainParameters(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -76,7 +76,7 @@ public class ChainParameters extends CommonBase { */ public ChainParameters clone() { long ret = bindings.ChainParameters_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChainParameters ret_hu_conv = new ChainParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelAnnouncement.java b/src/main/java/org/ldk/structs/ChannelAnnouncement.java index 91a09125..7653ceba 100644 --- a/src/main/java/org/ldk/structs/ChannelAnnouncement.java +++ b/src/main/java/org/ldk/structs/ChannelAnnouncement.java @@ -84,7 +84,7 @@ public class ChannelAnnouncement extends CommonBase { */ public UnsignedChannelAnnouncement get_contents() { long ret = bindings.ChannelAnnouncement_get_contents(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -102,7 +102,7 @@ public class ChannelAnnouncement extends CommonBase { */ public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg) { long ret = bindings.ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -113,7 +113,7 @@ public class ChannelAnnouncement extends CommonBase { */ public ChannelAnnouncement clone() { long ret = bindings.ChannelAnnouncement_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -132,7 +132,7 @@ public class ChannelAnnouncement extends CommonBase { */ public static Result_ChannelAnnouncementDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelAnnouncement_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelConfig.java b/src/main/java/org/ldk/structs/ChannelConfig.java index 26bcff3d..820d870e 100644 --- a/src/main/java/org/ldk/structs/ChannelConfig.java +++ b/src/main/java/org/ldk/structs/ChannelConfig.java @@ -308,7 +308,7 @@ public class ChannelConfig extends CommonBase { */ public static ChannelConfig of(int forwarding_fee_proportional_millionths_arg, int forwarding_fee_base_msat_arg, short cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, long max_dust_htlc_exposure_msat_arg, long force_close_avoidance_max_fee_satoshis_arg) { long ret = bindings.ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -319,7 +319,7 @@ public class ChannelConfig extends CommonBase { */ public ChannelConfig clone() { long ret = bindings.ChannelConfig_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -330,7 +330,7 @@ public class ChannelConfig extends CommonBase { */ public static ChannelConfig with_default() { long ret = bindings.ChannelConfig_default(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -349,7 +349,7 @@ public class ChannelConfig extends CommonBase { */ public static Result_ChannelConfigDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelConfig_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelCounterparty.java b/src/main/java/org/ldk/structs/ChannelCounterparty.java index 03d30fef..ad25abad 100644 --- a/src/main/java/org/ldk/structs/ChannelCounterparty.java +++ b/src/main/java/org/ldk/structs/ChannelCounterparty.java @@ -42,7 +42,7 @@ public class ChannelCounterparty extends CommonBase { */ public InitFeatures get_features() { long ret = bindings.ChannelCounterparty_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InitFeatures ret_hu_conv = new InitFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -93,7 +93,7 @@ public class ChannelCounterparty extends CommonBase { @Nullable public CounterpartyForwardingInfo get_forwarding_info() { long ret = bindings.ChannelCounterparty_get_forwarding_info(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyForwardingInfo ret_hu_conv = new CounterpartyForwardingInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class ChannelCounterparty extends CommonBase { */ public static ChannelCounterparty of(byte[] node_id_arg, InitFeatures features_arg, long unspendable_punishment_reserve_arg, CounterpartyForwardingInfo forwarding_info_arg) { long ret = bindings.ChannelCounterparty_new(node_id_arg, features_arg == null ? 0 : features_arg.ptr & ~1, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelCounterparty ret_hu_conv = new ChannelCounterparty(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -125,7 +125,7 @@ public class ChannelCounterparty extends CommonBase { */ public ChannelCounterparty clone() { long ret = bindings.ChannelCounterparty_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelCounterparty ret_hu_conv = new ChannelCounterparty(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelDetails.java b/src/main/java/org/ldk/structs/ChannelDetails.java index 42b0958a..81b4c1a7 100644 --- a/src/main/java/org/ldk/structs/ChannelDetails.java +++ b/src/main/java/org/ldk/structs/ChannelDetails.java @@ -45,7 +45,7 @@ public class ChannelDetails extends CommonBase { */ public ChannelCounterparty get_counterparty() { long ret = bindings.ChannelDetails_get_counterparty(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelCounterparty ret_hu_conv = new ChannelCounterparty(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -70,7 +70,7 @@ public class ChannelDetails extends CommonBase { @Nullable public OutPoint get_funding_txo() { long ret = bindings.ChannelDetails_get_funding_txo(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -95,7 +95,7 @@ public class ChannelDetails extends CommonBase { */ public Option_u64Z get_short_channel_id() { long ret = bindings.ChannelDetails_get_short_channel_id(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -137,7 +137,7 @@ public class ChannelDetails extends CommonBase { */ public Option_u64Z get_unspendable_punishment_reserve() { long ret = bindings.ChannelDetails_get_unspendable_punishment_reserve(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -248,7 +248,7 @@ public class ChannelDetails extends CommonBase { */ public Option_u32Z get_confirmations_required() { long ret = bindings.ChannelDetails_get_confirmations_required(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -282,7 +282,7 @@ public class ChannelDetails extends CommonBase { */ public Option_u16Z get_force_close_spend_delay() { long ret = bindings.ChannelDetails_get_force_close_spend_delay(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -384,7 +384,7 @@ public class ChannelDetails extends CommonBase { */ public static ChannelDetails of(byte[] channel_id_arg, ChannelCounterparty counterparty_arg, OutPoint funding_txo_arg, Option_u64Z short_channel_id_arg, long channel_value_satoshis_arg, Option_u64Z unspendable_punishment_reserve_arg, long user_id_arg, long outbound_capacity_msat_arg, long inbound_capacity_msat_arg, Option_u32Z confirmations_required_arg, Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_funding_locked_arg, boolean is_usable_arg, boolean is_public_arg) { long ret = bindings.ChannelDetails_new(channel_id_arg, counterparty_arg == null ? 0 : counterparty_arg.ptr & ~1, funding_txo_arg == null ? 0 : funding_txo_arg.ptr & ~1, short_channel_id_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelDetails ret_hu_conv = new ChannelDetails(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -395,7 +395,7 @@ public class ChannelDetails extends CommonBase { */ public ChannelDetails clone() { long ret = bindings.ChannelDetails_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelDetails ret_hu_conv = new ChannelDetails(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelFeatures.java b/src/main/java/org/ldk/structs/ChannelFeatures.java index 95f2863f..29627841 100644 --- a/src/main/java/org/ldk/structs/ChannelFeatures.java +++ b/src/main/java/org/ldk/structs/ChannelFeatures.java @@ -35,7 +35,7 @@ public class ChannelFeatures extends CommonBase { */ public ChannelFeatures clone() { long ret = bindings.ChannelFeatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -46,7 +46,7 @@ public class ChannelFeatures extends CommonBase { */ public static ChannelFeatures empty() { long ret = bindings.ChannelFeatures_empty(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class ChannelFeatures extends CommonBase { */ public static ChannelFeatures known() { long ret = bindings.ChannelFeatures_known(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -85,7 +85,7 @@ public class ChannelFeatures extends CommonBase { */ public static Result_ChannelFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelFeatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java b/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java index 633a3677..8f9fb17b 100644 --- a/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java +++ b/src/main/java/org/ldk/structs/ChannelHandshakeConfig.java @@ -119,7 +119,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public static ChannelHandshakeConfig of(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) { long ret = bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -130,7 +130,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public ChannelHandshakeConfig clone() { long ret = bindings.ChannelHandshakeConfig_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -141,7 +141,7 @@ public class ChannelHandshakeConfig extends CommonBase { */ public static ChannelHandshakeConfig with_default() { long ret = bindings.ChannelHandshakeConfig_default(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelHandshakeLimits.java b/src/main/java/org/ldk/structs/ChannelHandshakeLimits.java index 93bb3a1f..06e9432b 100644 --- a/src/main/java/org/ldk/structs/ChannelHandshakeLimits.java +++ b/src/main/java/org/ldk/structs/ChannelHandshakeLimits.java @@ -222,7 +222,7 @@ public class ChannelHandshakeLimits extends CommonBase { */ public static ChannelHandshakeLimits of(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg) { long ret = bindings.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -233,7 +233,7 @@ public class ChannelHandshakeLimits extends CommonBase { */ public ChannelHandshakeLimits clone() { long ret = bindings.ChannelHandshakeLimits_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -244,7 +244,7 @@ public class ChannelHandshakeLimits extends CommonBase { */ public static ChannelHandshakeLimits with_default() { long ret = bindings.ChannelHandshakeLimits_default(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelInfo.java b/src/main/java/org/ldk/structs/ChannelInfo.java index 7bec5b21..c1053596 100644 --- a/src/main/java/org/ldk/structs/ChannelInfo.java +++ b/src/main/java/org/ldk/structs/ChannelInfo.java @@ -25,7 +25,7 @@ public class ChannelInfo extends CommonBase { */ public ChannelFeatures get_features() { long ret = bindings.ChannelInfo_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -61,7 +61,7 @@ public class ChannelInfo extends CommonBase { @Nullable public DirectionalChannelInfo get_one_to_two() { long ret = bindings.ChannelInfo_get_one_to_two(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -99,7 +99,7 @@ public class ChannelInfo extends CommonBase { @Nullable public DirectionalChannelInfo get_two_to_one() { long ret = bindings.ChannelInfo_get_two_to_one(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -119,7 +119,7 @@ public class ChannelInfo extends CommonBase { */ public Option_u64Z get_capacity_sats() { long ret = bindings.ChannelInfo_get_capacity_sats(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -143,7 +143,7 @@ public class ChannelInfo extends CommonBase { @Nullable public ChannelAnnouncement get_announcement_message() { long ret = bindings.ChannelInfo_get_announcement_message(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -166,7 +166,7 @@ public class ChannelInfo extends CommonBase { */ public static ChannelInfo of(ChannelFeatures features_arg, byte[] node_one_arg, DirectionalChannelInfo one_to_two_arg, byte[] node_two_arg, DirectionalChannelInfo two_to_one_arg, Option_u64Z capacity_sats_arg, ChannelAnnouncement announcement_message_arg) { long ret = bindings.ChannelInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, node_one_arg, one_to_two_arg == null ? 0 : one_to_two_arg.ptr & ~1, node_two_arg, two_to_one_arg == null ? 0 : two_to_one_arg.ptr & ~1, capacity_sats_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelInfo ret_hu_conv = new ChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -177,7 +177,7 @@ public class ChannelInfo extends CommonBase { */ public ChannelInfo clone() { long ret = bindings.ChannelInfo_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelInfo ret_hu_conv = new ChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -196,7 +196,7 @@ public class ChannelInfo extends CommonBase { */ public static Result_ChannelInfoDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelInfo_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelManager.java b/src/main/java/org/ldk/structs/ChannelManager.java index e3ce6138..eb072594 100644 --- a/src/main/java/org/ldk/structs/ChannelManager.java +++ b/src/main/java/org/ldk/structs/ChannelManager.java @@ -70,7 +70,7 @@ public class ChannelManager extends CommonBase { */ public static ChannelManager of(FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, ChainParameters params) { long ret = bindings.ChannelManager_new(fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, params == null ? 0 : params.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelManager ret_hu_conv = new ChannelManager(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(fee_est); @@ -86,7 +86,7 @@ public class ChannelManager extends CommonBase { */ public UserConfig get_current_default_configuration() { long ret = bindings.ChannelManager_get_current_default_configuration(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UserConfig ret_hu_conv = new UserConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -115,7 +115,7 @@ public class ChannelManager extends CommonBase { */ public Result_NoneAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_id, @Nullable UserConfig override_config) { long ret = bindings.ChannelManager_create_channel(this.ptr, their_network_key, channel_value_satoshis, push_msat, user_id, override_config == null ? 0 : override_config.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -177,7 +177,7 @@ public class ChannelManager extends CommonBase { */ public Result_NoneAPIErrorZ close_channel(byte[] channel_id) { long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -205,7 +205,7 @@ public class ChannelManager extends CommonBase { */ public Result_NoneAPIErrorZ close_channel_with_target_feerate(byte[] channel_id, int target_feerate_sats_per_1000_weight) { long ret = bindings.ChannelManager_close_channel_with_target_feerate(this.ptr, channel_id, target_feerate_sats_per_1000_weight); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -216,7 +216,7 @@ public class ChannelManager extends CommonBase { */ public Result_NoneAPIErrorZ force_close_channel(byte[] channel_id) { long ret = bindings.ChannelManager_force_close_channel(this.ptr, channel_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -274,7 +274,7 @@ public class ChannelManager extends CommonBase { */ public Result_NonePaymentSendFailureZ send_payment(Route route, byte[] payment_hash, @Nullable byte[] payment_secret) { long ret = bindings.ChannelManager_send_payment(this.ptr, route == null ? 0 : route.ptr & ~1, payment_hash, payment_secret); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret); this.ptrs_to.add(route); return ret_hu_conv; @@ -300,7 +300,7 @@ public class ChannelManager extends CommonBase { */ public Result_PaymentHashPaymentSendFailureZ send_spontaneous_payment(Route route, @Nullable byte[] payment_preimage) { long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0 : route.ptr & ~1, payment_preimage); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret); this.ptrs_to.add(route); return ret_hu_conv; @@ -330,7 +330,7 @@ public class ChannelManager extends CommonBase { */ public Result_NoneAPIErrorZ funding_transaction_generated(byte[] temporary_channel_id, byte[] funding_transaction) { long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id, funding_transaction); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -472,7 +472,7 @@ public class ChannelManager extends CommonBase { */ public TwoTuple_PaymentHashPaymentSecretZ create_inbound_payment(Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) { long ret = bindings.ChannelManager_create_inbound_payment(this.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -527,7 +527,7 @@ public class ChannelManager extends CommonBase { */ public Result_PaymentSecretAPIErrorZ create_inbound_payment_for_hash(byte[] payment_hash, Option_u64Z min_value_msat, int invoice_expiry_delta_secs, long user_payment_id) { long ret = bindings.ChannelManager_create_inbound_payment_for_hash(this.ptr, payment_hash, min_value_msat.ptr, invoice_expiry_delta_secs, user_payment_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -538,7 +538,7 @@ public class ChannelManager extends CommonBase { */ public MessageSendEventsProvider as_MessageSendEventsProvider() { long ret = bindings.ChannelManager_as_MessageSendEventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -550,7 +550,7 @@ public class ChannelManager extends CommonBase { */ public EventsProvider as_EventsProvider() { long ret = bindings.ChannelManager_as_EventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } EventsProvider ret_hu_conv = new EventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -562,7 +562,7 @@ public class ChannelManager extends CommonBase { */ public Listen as_Listen() { long ret = bindings.ChannelManager_as_Listen(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Listen ret_hu_conv = new Listen(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -574,7 +574,7 @@ public class ChannelManager extends CommonBase { */ public Confirm as_Confirm() { long ret = bindings.ChannelManager_as_Confirm(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Confirm ret_hu_conv = new Confirm(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -607,7 +607,7 @@ public class ChannelManager extends CommonBase { */ public BestBlock current_best_block() { long ret = bindings.ChannelManager_current_best_block(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -619,7 +619,7 @@ public class ChannelManager extends CommonBase { */ public ChannelMessageHandler as_ChannelMessageHandler() { long ret = bindings.ChannelManager_as_ChannelMessageHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelManagerPersister.java b/src/main/java/org/ldk/structs/ChannelManagerPersister.java index abff5e62..2030e473 100644 --- a/src/main/java/org/ldk/structs/ChannelManagerPersister.java +++ b/src/main/java/org/ldk/structs/ChannelManagerPersister.java @@ -55,7 +55,7 @@ public class ChannelManagerPersister extends CommonBase { */ public Result_NoneErrorZ persist_manager(ChannelManager channel_manager) { long ret = bindings.ChannelManagerPersister_persist_manager(this.ptr, channel_manager == null ? 0 : channel_manager.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); this.ptrs_to.add(channel_manager); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java b/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java index 1f5d3216..5298b8a2 100644 --- a/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java +++ b/src/main/java/org/ldk/structs/ChannelManagerReadArgs.java @@ -50,7 +50,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public KeysInterface get_keys_manager() { long ret = bindings.ChannelManagerReadArgs_get_keys_manager(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } KeysInterface ret_hu_conv = new KeysInterface(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -73,7 +73,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public FeeEstimator get_fee_estimator() { long ret = bindings.ChannelManagerReadArgs_get_fee_estimator(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FeeEstimator ret_hu_conv = new FeeEstimator(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -98,7 +98,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public Watch get_chain_monitor() { long ret = bindings.ChannelManagerReadArgs_get_chain_monitor(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Watch ret_hu_conv = new Watch(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -123,7 +123,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public BroadcasterInterface get_tx_broadcaster() { long ret = bindings.ChannelManagerReadArgs_get_tx_broadcaster(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BroadcasterInterface ret_hu_conv = new BroadcasterInterface(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -145,7 +145,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public Logger get_logger() { long ret = bindings.ChannelManagerReadArgs_get_logger(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Logger ret_hu_conv = new Logger(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -166,7 +166,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public UserConfig get_default_config() { long ret = bindings.ChannelManagerReadArgs_get_default_config(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UserConfig ret_hu_conv = new UserConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -187,7 +187,7 @@ public class ChannelManagerReadArgs extends CommonBase { */ public static ChannelManagerReadArgs of(KeysInterface keys_manager, FeeEstimator fee_estimator, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, UserConfig default_config, ChannelMonitor[] channel_monitors) { long ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr & ~1).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelManagerReadArgs ret_hu_conv = new ChannelManagerReadArgs(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(keys_manager); diff --git a/src/main/java/org/ldk/structs/ChannelMonitor.java b/src/main/java/org/ldk/structs/ChannelMonitor.java index eff5feb9..ab7b7691 100644 --- a/src/main/java/org/ldk/structs/ChannelMonitor.java +++ b/src/main/java/org/ldk/structs/ChannelMonitor.java @@ -39,7 +39,7 @@ public class ChannelMonitor extends CommonBase { */ public ChannelMonitor clone() { long ret = bindings.ChannelMonitor_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMonitor ret_hu_conv = new ChannelMonitor(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -61,7 +61,7 @@ public class ChannelMonitor extends CommonBase { */ public Result_NoneMonitorUpdateErrorZ update_monitor(ChannelMonitorUpdate updates, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) { long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr & ~1, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret); this.ptrs_to.add(updates); this.ptrs_to.add(broadcaster); @@ -84,7 +84,7 @@ public class ChannelMonitor extends CommonBase { */ public TwoTuple_OutPointScriptZ get_funding_txo() { long ret = bindings.ChannelMonitor_get_funding_txo(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -285,7 +285,7 @@ public class ChannelMonitor extends CommonBase { */ public BestBlock current_best_block() { long ret = bindings.ChannelMonitor_current_best_block(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BestBlock ret_hu_conv = new BestBlock(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java b/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java index 14015a01..43ed1326 100644 --- a/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java +++ b/src/main/java/org/ldk/structs/ChannelMonitorUpdate.java @@ -60,7 +60,7 @@ public class ChannelMonitorUpdate extends CommonBase { */ public ChannelMonitorUpdate clone() { long ret = bindings.ChannelMonitorUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -79,7 +79,7 @@ public class ChannelMonitorUpdate extends CommonBase { */ public static Result_ChannelMonitorUpdateDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelMonitorUpdate_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelPublicKeys.java b/src/main/java/org/ldk/structs/ChannelPublicKeys.java index 49c0fcf3..84a1d7e8 100644 --- a/src/main/java/org/ldk/structs/ChannelPublicKeys.java +++ b/src/main/java/org/ldk/structs/ChannelPublicKeys.java @@ -117,7 +117,7 @@ public class ChannelPublicKeys extends CommonBase { */ public static ChannelPublicKeys of(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg) { long ret = bindings.ChannelPublicKeys_new(funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -128,7 +128,7 @@ public class ChannelPublicKeys extends CommonBase { */ public ChannelPublicKeys clone() { long ret = bindings.ChannelPublicKeys_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -147,7 +147,7 @@ public class ChannelPublicKeys extends CommonBase { */ public static Result_ChannelPublicKeysDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelPublicKeys_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelReestablish.java b/src/main/java/org/ldk/structs/ChannelReestablish.java index c3eb2507..914c8acc 100644 --- a/src/main/java/org/ldk/structs/ChannelReestablish.java +++ b/src/main/java/org/ldk/structs/ChannelReestablish.java @@ -69,7 +69,7 @@ public class ChannelReestablish extends CommonBase { */ public ChannelReestablish clone() { long ret = bindings.ChannelReestablish_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -88,7 +88,7 @@ public class ChannelReestablish extends CommonBase { */ public static Result_ChannelReestablishDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelReestablish_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java index b581dc91..c22941e9 100644 --- a/src/main/java/org/ldk/structs/ChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/ChannelTransactionParameters.java @@ -28,7 +28,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys get_holder_pubkeys() { long ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -82,7 +82,7 @@ public class ChannelTransactionParameters extends CommonBase { @Nullable public CounterpartyChannelTransactionParameters get_counterparty_parameters() { long ret = bindings.ChannelTransactionParameters_get_counterparty_parameters(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -106,7 +106,7 @@ public class ChannelTransactionParameters extends CommonBase { @Nullable public OutPoint get_funding_outpoint() { long ret = bindings.ChannelTransactionParameters_get_funding_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -126,7 +126,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public static ChannelTransactionParameters of(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg) { long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr & ~1, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr & ~1, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -137,7 +137,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public ChannelTransactionParameters clone() { long ret = bindings.ChannelTransactionParameters_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -159,7 +159,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public DirectedChannelTransactionParameters as_holder_broadcastable() { long ret = bindings.ChannelTransactionParameters_as_holder_broadcastable(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -173,7 +173,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public DirectedChannelTransactionParameters as_counterparty_broadcastable() { long ret = bindings.ChannelTransactionParameters_as_counterparty_broadcastable(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectedChannelTransactionParameters ret_hu_conv = new DirectedChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -192,7 +192,7 @@ public class ChannelTransactionParameters extends CommonBase { */ public static Result_ChannelTransactionParametersDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelTransactionParameters_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ChannelUpdate.java b/src/main/java/org/ldk/structs/ChannelUpdate.java index 66d4ed0c..13afaffc 100644 --- a/src/main/java/org/ldk/structs/ChannelUpdate.java +++ b/src/main/java/org/ldk/structs/ChannelUpdate.java @@ -39,7 +39,7 @@ public class ChannelUpdate extends CommonBase { */ public UnsignedChannelUpdate get_contents() { long ret = bindings.ChannelUpdate_get_contents(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class ChannelUpdate extends CommonBase { */ public static ChannelUpdate of(byte[] signature_arg, UnsignedChannelUpdate contents_arg) { long ret = bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -68,7 +68,7 @@ public class ChannelUpdate extends CommonBase { */ public ChannelUpdate clone() { long ret = bindings.ChannelUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -87,7 +87,7 @@ public class ChannelUpdate extends CommonBase { */ public static Result_ChannelUpdateDecodeErrorZ read(byte[] ser) { long ret = bindings.ChannelUpdate_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ClosingSigned.java b/src/main/java/org/ldk/structs/ClosingSigned.java index 948b60ef..a3af4acd 100644 --- a/src/main/java/org/ldk/structs/ClosingSigned.java +++ b/src/main/java/org/ldk/structs/ClosingSigned.java @@ -73,7 +73,7 @@ public class ClosingSigned extends CommonBase { @Nullable public ClosingSignedFeeRange get_fee_range() { long ret = bindings.ClosingSigned_get_fee_range(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -94,7 +94,7 @@ public class ClosingSigned extends CommonBase { */ public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, ClosingSignedFeeRange fee_range_arg) { long ret = bindings.ClosingSigned_new(channel_id_arg, fee_satoshis_arg, signature_arg, fee_range_arg == null ? 0 : fee_range_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingSigned ret_hu_conv = new ClosingSigned(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -105,7 +105,7 @@ public class ClosingSigned extends CommonBase { */ public ClosingSigned clone() { long ret = bindings.ClosingSigned_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingSigned ret_hu_conv = new ClosingSigned(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -124,7 +124,7 @@ public class ClosingSigned extends CommonBase { */ public static Result_ClosingSignedDecodeErrorZ read(byte[] ser) { long ret = bindings.ClosingSigned_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java index 0dbbf6c7..04b5d8c7 100644 --- a/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java +++ b/src/main/java/org/ldk/structs/ClosingSignedFeeRange.java @@ -60,7 +60,7 @@ public class ClosingSignedFeeRange extends CommonBase { */ public static ClosingSignedFeeRange of(long min_fee_satoshis_arg, long max_fee_satoshis_arg) { long ret = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -71,7 +71,7 @@ public class ClosingSignedFeeRange extends CommonBase { */ public ClosingSignedFeeRange clone() { long ret = bindings.ClosingSignedFeeRange_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingSignedFeeRange ret_hu_conv = new ClosingSignedFeeRange(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -90,7 +90,7 @@ public class ClosingSignedFeeRange extends CommonBase { */ public static Result_ClosingSignedFeeRangeDecodeErrorZ read(byte[] ser) { long ret = bindings.ClosingSignedFeeRange_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ClosingTransaction.java b/src/main/java/org/ldk/structs/ClosingTransaction.java index d9b09dab..e08a432f 100644 --- a/src/main/java/org/ldk/structs/ClosingTransaction.java +++ b/src/main/java/org/ldk/structs/ClosingTransaction.java @@ -28,7 +28,7 @@ public class ClosingTransaction extends CommonBase { */ public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, OutPoint funding_outpoint) { long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosingTransaction ret_hu_conv = new ClosingTransaction(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -44,7 +44,7 @@ public class ClosingTransaction extends CommonBase { */ public TrustedClosingTransaction trust() { long ret = bindings.ClosingTransaction_trust(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TrustedClosingTransaction ret_hu_conv = new TrustedClosingTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -60,7 +60,7 @@ public class ClosingTransaction extends CommonBase { */ public Result_TrustedClosingTransactionNoneZ verify(OutPoint funding_outpoint) { long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0 : funding_outpoint.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ClosureReason.java b/src/main/java/org/ldk/structs/ClosureReason.java index 495f5ab2..b014fdb5 100644 --- a/src/main/java/org/ldk/structs/ClosureReason.java +++ b/src/main/java/org/ldk/structs/ClosureReason.java @@ -98,7 +98,7 @@ public class ClosureReason extends CommonBase { */ public ClosureReason clone() { long ret = bindings.ClosureReason_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -109,7 +109,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason counterparty_force_closed(java.lang.String peer_msg) { long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -120,7 +120,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason holder_force_closed() { long ret = bindings.ClosureReason_holder_force_closed(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -131,7 +131,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason cooperative_closure() { long ret = bindings.ClosureReason_cooperative_closure(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -142,7 +142,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason commitment_tx_confirmed() { long ret = bindings.ClosureReason_commitment_tx_confirmed(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -153,7 +153,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason processing_error(java.lang.String err) { long ret = bindings.ClosureReason_processing_error(err); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -164,7 +164,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason disconnected_peer() { long ret = bindings.ClosureReason_disconnected_peer(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -175,7 +175,7 @@ public class ClosureReason extends CommonBase { */ public static ClosureReason outdated_channel_manager() { long ret = bindings.ClosureReason_outdated_channel_manager(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ClosureReason ret_hu_conv = ClosureReason.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/CommitmentSigned.java b/src/main/java/org/ldk/structs/CommitmentSigned.java index 487c099e..e7ac1a58 100644 --- a/src/main/java/org/ldk/structs/CommitmentSigned.java +++ b/src/main/java/org/ldk/structs/CommitmentSigned.java @@ -61,7 +61,7 @@ public class CommitmentSigned extends CommonBase { */ public static CommitmentSigned of(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) { long ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -72,7 +72,7 @@ public class CommitmentSigned extends CommonBase { */ public CommitmentSigned clone() { long ret = bindings.CommitmentSigned_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -91,7 +91,7 @@ public class CommitmentSigned extends CommonBase { */ public static Result_CommitmentSignedDecodeErrorZ read(byte[] ser) { long ret = bindings.CommitmentSigned_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/CommitmentTransaction.java b/src/main/java/org/ldk/structs/CommitmentTransaction.java index fb6b54e5..fafde095 100644 --- a/src/main/java/org/ldk/structs/CommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/CommitmentTransaction.java @@ -29,7 +29,7 @@ public class CommitmentTransaction extends CommonBase { */ public CommitmentTransaction clone() { long ret = bindings.CommitmentTransaction_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentTransaction ret_hu_conv = new CommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -48,7 +48,7 @@ public class CommitmentTransaction extends CommonBase { */ public static Result_CommitmentTransactionDecodeErrorZ read(byte[] ser) { long ret = bindings.CommitmentTransaction_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -95,7 +95,7 @@ public class CommitmentTransaction extends CommonBase { */ public TrustedCommitmentTransaction trust() { long ret = bindings.CommitmentTransaction_trust(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TrustedCommitmentTransaction ret_hu_conv = new TrustedCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -111,7 +111,7 @@ public class CommitmentTransaction extends CommonBase { */ public Result_TrustedCommitmentTransactionNoneZ verify(DirectedChannelTransactionParameters channel_parameters, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) { long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr & ~1, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); this.ptrs_to.add(channel_parameters); this.ptrs_to.add(broadcaster_keys); diff --git a/src/main/java/org/ldk/structs/CommitmentUpdate.java b/src/main/java/org/ldk/structs/CommitmentUpdate.java index 797eca92..6b6e5f47 100644 --- a/src/main/java/org/ldk/structs/CommitmentUpdate.java +++ b/src/main/java/org/ldk/structs/CommitmentUpdate.java @@ -116,7 +116,7 @@ public class CommitmentUpdate extends CommonBase { @Nullable public UpdateFee get_update_fee() { long ret = bindings.CommitmentUpdate_get_update_fee(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFee ret_hu_conv = new UpdateFee(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -136,7 +136,7 @@ public class CommitmentUpdate extends CommonBase { */ public CommitmentSigned get_commitment_signed() { long ret = bindings.CommitmentUpdate_get_commitment_signed(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -154,7 +154,7 @@ public class CommitmentUpdate extends CommonBase { */ public static CommitmentUpdate of(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, UpdateFee update_fee_arg, CommitmentSigned commitment_signed_arg) { long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr & ~1).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr & ~1).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr & ~1).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr & ~1).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -165,7 +165,7 @@ public class CommitmentUpdate extends CommonBase { */ public CommitmentUpdate clone() { long ret = bindings.CommitmentUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/CommonBase.java b/src/main/java/org/ldk/structs/CommonBase.java index 62398862..9ee80fd7 100644 --- a/src/main/java/org/ldk/structs/CommonBase.java +++ b/src/main/java/org/ldk/structs/CommonBase.java @@ -3,5 +3,5 @@ import java.util.LinkedList; class CommonBase { long ptr; LinkedList ptrs_to = new LinkedList(); - protected CommonBase(long ptr) { assert ptr > 1024; this.ptr = ptr; } + protected CommonBase(long ptr) { assert ptr < 0 || ptr > 1024; this.ptr = ptr; } } diff --git a/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java b/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java index 69b90198..c322239a 100644 --- a/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java @@ -24,7 +24,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys get_pubkeys() { long ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { */ public static CounterpartyChannelTransactionParameters of(ChannelPublicKeys pubkeys_arg, short selected_contest_delay_arg) { long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr & ~1, selected_contest_delay_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -68,7 +68,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { */ public CounterpartyChannelTransactionParameters clone() { long ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -87,7 +87,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase { */ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ read(byte[] ser) { long ret = bindings.CounterpartyChannelTransactionParameters_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/CounterpartyForwardingInfo.java b/src/main/java/org/ldk/structs/CounterpartyForwardingInfo.java index d09b6b5c..96ca25a8 100644 --- a/src/main/java/org/ldk/structs/CounterpartyForwardingInfo.java +++ b/src/main/java/org/ldk/structs/CounterpartyForwardingInfo.java @@ -73,7 +73,7 @@ public class CounterpartyForwardingInfo extends CommonBase { */ public static CounterpartyForwardingInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg) { long ret = bindings.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyForwardingInfo ret_hu_conv = new CounterpartyForwardingInfo(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -84,7 +84,7 @@ public class CounterpartyForwardingInfo extends CommonBase { */ public CounterpartyForwardingInfo clone() { long ret = bindings.CounterpartyForwardingInfo_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CounterpartyForwardingInfo ret_hu_conv = new CounterpartyForwardingInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/CustomMessageHandler.java b/src/main/java/org/ldk/structs/CustomMessageHandler.java index 5c1a4fab..59fadd09 100644 --- a/src/main/java/org/ldk/structs/CustomMessageHandler.java +++ b/src/main/java/org/ldk/structs/CustomMessageHandler.java @@ -73,7 +73,7 @@ public class CustomMessageHandler extends CommonBase { */ public Result_NoneLightningErrorZ handle_custom_message(Type msg, byte[] sender_node_id) { long ret = bindings.CustomMessageHandler_handle_custom_message(this.ptr, msg == null ? 0 : msg.ptr, sender_node_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/CustomMessageReader.java b/src/main/java/org/ldk/structs/CustomMessageReader.java index bfa2e11c..889712a6 100644 --- a/src/main/java/org/ldk/structs/CustomMessageReader.java +++ b/src/main/java/org/ldk/structs/CustomMessageReader.java @@ -53,7 +53,7 @@ public class CustomMessageReader extends CommonBase { */ public Result_COption_TypeZDecodeErrorZ read(short message_type, byte[] buffer) { long ret = bindings.CustomMessageReader_read(this.ptr, message_type, buffer); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/DataLossProtect.java b/src/main/java/org/ldk/structs/DataLossProtect.java index 3c625d07..d8655be6 100644 --- a/src/main/java/org/ldk/structs/DataLossProtect.java +++ b/src/main/java/org/ldk/structs/DataLossProtect.java @@ -59,7 +59,7 @@ public class DataLossProtect extends CommonBase { */ public static DataLossProtect of(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg) { long ret = bindings.DataLossProtect_new(your_last_per_commitment_secret_arg, my_current_per_commitment_point_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DataLossProtect ret_hu_conv = new DataLossProtect(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -70,7 +70,7 @@ public class DataLossProtect extends CommonBase { */ public DataLossProtect clone() { long ret = bindings.DataLossProtect_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DataLossProtect ret_hu_conv = new DataLossProtect(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/DecodeError.java b/src/main/java/org/ldk/structs/DecodeError.java index 198e61d1..dbf1fc88 100644 --- a/src/main/java/org/ldk/structs/DecodeError.java +++ b/src/main/java/org/ldk/structs/DecodeError.java @@ -24,7 +24,7 @@ public class DecodeError extends CommonBase { */ public DecodeError clone() { long ret = bindings.DecodeError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DecodeError ret_hu_conv = new DecodeError(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java index 818c6a65..64dd1081 100644 --- a/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java @@ -25,7 +25,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { */ public OutPoint get_outpoint() { long ret = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -133,7 +133,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { */ public static DelayedPaymentOutputDescriptor of(OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, TxOut output_arg, byte[] revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, per_commitment_point_arg, to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -144,7 +144,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { */ public DelayedPaymentOutputDescriptor clone() { long ret = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -163,7 +163,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase { */ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ read(byte[] ser) { long ret = bindings.DelayedPaymentOutputDescriptor_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Description.java b/src/main/java/org/ldk/structs/Description.java index 394beac8..7d224c7e 100644 --- a/src/main/java/org/ldk/structs/Description.java +++ b/src/main/java/org/ldk/structs/Description.java @@ -27,7 +27,7 @@ public class Description extends CommonBase { */ public Description clone() { long ret = bindings.Description_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Description ret_hu_conv = new Description(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -60,7 +60,7 @@ public class Description extends CommonBase { */ public static Result_DescriptionCreationErrorZ of(java.lang.String description) { long ret = bindings.Description_new(description); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java b/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java index b86804ca..2dad28ca 100644 --- a/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java +++ b/src/main/java/org/ldk/structs/DirectedChannelTransactionParameters.java @@ -28,7 +28,7 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys broadcaster_pubkeys() { long ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -39,7 +39,7 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public ChannelPublicKeys countersignatory_pubkeys() { long ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -70,7 +70,7 @@ public class DirectedChannelTransactionParameters extends CommonBase { */ public OutPoint funding_outpoint() { long ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/DirectionalChannelInfo.java b/src/main/java/org/ldk/structs/DirectionalChannelInfo.java index a67b4e98..2faa0727 100644 --- a/src/main/java/org/ldk/structs/DirectionalChannelInfo.java +++ b/src/main/java/org/ldk/structs/DirectionalChannelInfo.java @@ -87,7 +87,7 @@ public class DirectionalChannelInfo extends CommonBase { */ public Option_u64Z get_htlc_maximum_msat() { long ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -105,7 +105,7 @@ public class DirectionalChannelInfo extends CommonBase { */ public RoutingFees get_fees() { long ret = bindings.DirectionalChannelInfo_get_fees(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingFees ret_hu_conv = new RoutingFees(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -129,7 +129,7 @@ public class DirectionalChannelInfo extends CommonBase { @Nullable public ChannelUpdate get_last_update_message() { long ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -152,7 +152,7 @@ public class DirectionalChannelInfo extends CommonBase { */ public static DirectionalChannelInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) { long ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -163,7 +163,7 @@ public class DirectionalChannelInfo extends CommonBase { */ public DirectionalChannelInfo clone() { long ret = bindings.DirectionalChannelInfo_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -182,7 +182,7 @@ public class DirectionalChannelInfo extends CommonBase { */ public static Result_DirectionalChannelInfoDecodeErrorZ read(byte[] ser) { long ret = bindings.DirectionalChannelInfo_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ErrorAction.java b/src/main/java/org/ldk/structs/ErrorAction.java index dd4e5604..12b8de2a 100644 --- a/src/main/java/org/ldk/structs/ErrorAction.java +++ b/src/main/java/org/ldk/structs/ErrorAction.java @@ -80,7 +80,7 @@ public class ErrorAction extends CommonBase { */ public ErrorAction clone() { long ret = bindings.ErrorAction_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -91,7 +91,7 @@ public class ErrorAction extends CommonBase { */ public static ErrorAction disconnect_peer(ErrorMessage msg) { long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -102,7 +102,7 @@ public class ErrorAction extends CommonBase { */ public static ErrorAction ignore_error() { long ret = bindings.ErrorAction_ignore_error(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -113,7 +113,7 @@ public class ErrorAction extends CommonBase { */ public static ErrorAction ignore_and_log(org.ldk.enums.Level a) { long ret = bindings.ErrorAction_ignore_and_log(a); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -124,7 +124,7 @@ public class ErrorAction extends CommonBase { */ public static ErrorAction send_error_message(ErrorMessage msg) { long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ErrorMessage.java b/src/main/java/org/ldk/structs/ErrorMessage.java index 2c1b2141..a0ff44a4 100644 --- a/src/main/java/org/ldk/structs/ErrorMessage.java +++ b/src/main/java/org/ldk/structs/ErrorMessage.java @@ -60,7 +60,7 @@ public class ErrorMessage extends CommonBase { */ public static ErrorMessage of(byte[] channel_id_arg, java.lang.String data_arg) { long ret = bindings.ErrorMessage_new(channel_id_arg, data_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorMessage ret_hu_conv = new ErrorMessage(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -71,7 +71,7 @@ public class ErrorMessage extends CommonBase { */ public ErrorMessage clone() { long ret = bindings.ErrorMessage_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorMessage ret_hu_conv = new ErrorMessage(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -90,7 +90,7 @@ public class ErrorMessage extends CommonBase { */ public static Result_ErrorMessageDecodeErrorZ read(byte[] ser) { long ret = bindings.ErrorMessage_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ErroringMessageHandler.java b/src/main/java/org/ldk/structs/ErroringMessageHandler.java index 7ce8b6a8..38be35bd 100644 --- a/src/main/java/org/ldk/structs/ErroringMessageHandler.java +++ b/src/main/java/org/ldk/structs/ErroringMessageHandler.java @@ -25,7 +25,7 @@ public class ErroringMessageHandler extends CommonBase { */ public static ErroringMessageHandler of() { long ret = bindings.ErroringMessageHandler_new(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErroringMessageHandler ret_hu_conv = new ErroringMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -37,7 +37,7 @@ public class ErroringMessageHandler extends CommonBase { */ public MessageSendEventsProvider as_MessageSendEventsProvider() { long ret = bindings.ErroringMessageHandler_as_MessageSendEventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -49,7 +49,7 @@ public class ErroringMessageHandler extends CommonBase { */ public ChannelMessageHandler as_ChannelMessageHandler() { long ret = bindings.ErroringMessageHandler_as_ChannelMessageHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Event.java b/src/main/java/org/ldk/structs/Event.java index 6733a54b..3a62005b 100644 --- a/src/main/java/org/ldk/structs/Event.java +++ b/src/main/java/org/ldk/structs/Event.java @@ -253,7 +253,7 @@ public class Event extends CommonBase { */ public Event clone() { long ret = bindings.Event_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -264,7 +264,7 @@ public class Event extends CommonBase { */ public static Event funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id) { long ret = bindings.Event_funding_generation_ready(temporary_channel_id, channel_value_satoshis, output_script, user_channel_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -275,7 +275,7 @@ public class Event extends CommonBase { */ public static Event payment_received(byte[] payment_hash, long amt, PaymentPurpose purpose) { long ret = bindings.Event_payment_received(payment_hash, amt, purpose.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -286,7 +286,7 @@ public class Event extends CommonBase { */ public static Event payment_sent(byte[] payment_preimage) { long ret = bindings.Event_payment_sent(payment_preimage); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -297,7 +297,7 @@ public class Event extends CommonBase { */ public static Event payment_path_failed(byte[] payment_hash, boolean rejected_by_dest, Option_NetworkUpdateZ network_update, boolean all_paths_failed, RouteHop[] path) { long ret = bindings.Event_payment_path_failed(payment_hash, rejected_by_dest, network_update.ptr, all_paths_failed, path != null ? Arrays.stream(path).mapToLong(path_conv_10 -> path_conv_10 == null ? 0 : path_conv_10.ptr & ~1).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -308,7 +308,7 @@ public class Event extends CommonBase { */ public static Event pending_htlcs_forwardable(long time_forwardable) { long ret = bindings.Event_pending_htlcs_forwardable(time_forwardable); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -319,7 +319,7 @@ public class Event extends CommonBase { */ public static Event spendable_outputs(SpendableOutputDescriptor[] outputs) { long ret = bindings.Event_spendable_outputs(outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_27 -> outputs_conv_27.ptr).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -330,7 +330,7 @@ public class Event extends CommonBase { */ public static Event payment_forwarded(Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx) { long ret = bindings.Event_payment_forwarded(fee_earned_msat.ptr, claim_from_onchain_tx); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -341,7 +341,7 @@ public class Event extends CommonBase { */ public static Event channel_closed(byte[] channel_id, ClosureReason reason) { long ret = bindings.Event_channel_closed(channel_id, reason.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Event ret_hu_conv = Event.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ExpiryTime.java b/src/main/java/org/ldk/structs/ExpiryTime.java index 4c1c9183..972befda 100644 --- a/src/main/java/org/ldk/structs/ExpiryTime.java +++ b/src/main/java/org/ldk/structs/ExpiryTime.java @@ -30,7 +30,7 @@ public class ExpiryTime extends CommonBase { */ public ExpiryTime clone() { long ret = bindings.ExpiryTime_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ExpiryTime ret_hu_conv = new ExpiryTime(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -62,7 +62,7 @@ public class ExpiryTime extends CommonBase { */ public static Result_ExpiryTimeCreationErrorZ from_seconds(long seconds) { long ret = bindings.ExpiryTime_from_seconds(seconds); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -74,7 +74,7 @@ public class ExpiryTime extends CommonBase { */ public static Result_ExpiryTimeCreationErrorZ from_duration(long duration) { long ret = bindings.ExpiryTime_from_duration(duration); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Fallback.java b/src/main/java/org/ldk/structs/Fallback.java index c041d4be..5ec806ed 100644 --- a/src/main/java/org/ldk/structs/Fallback.java +++ b/src/main/java/org/ldk/structs/Fallback.java @@ -62,7 +62,7 @@ public class Fallback extends CommonBase { */ public Fallback clone() { long ret = bindings.Fallback_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Fallback ret_hu_conv = Fallback.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -73,7 +73,7 @@ public class Fallback extends CommonBase { */ public static Fallback seg_wit_program(UInt5 version, byte[] program) { long ret = bindings.Fallback_seg_wit_program(version.getVal(), program); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Fallback ret_hu_conv = Fallback.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -84,7 +84,7 @@ public class Fallback extends CommonBase { */ public static Fallback pub_key_hash(byte[] a) { long ret = bindings.Fallback_pub_key_hash(a); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Fallback ret_hu_conv = Fallback.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -95,7 +95,7 @@ public class Fallback extends CommonBase { */ public static Fallback script_hash(byte[] a) { long ret = bindings.Fallback_script_hash(a); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Fallback ret_hu_conv = Fallback.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/FilesystemPersister.java b/src/main/java/org/ldk/structs/FilesystemPersister.java index fe70a484..8ef595f1 100644 --- a/src/main/java/org/ldk/structs/FilesystemPersister.java +++ b/src/main/java/org/ldk/structs/FilesystemPersister.java @@ -36,7 +36,7 @@ public class FilesystemPersister extends CommonBase { */ public static FilesystemPersister of(java.lang.String path_to_channel_data) { long ret = bindings.FilesystemPersister_new(path_to_channel_data); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FilesystemPersister ret_hu_conv = new FilesystemPersister(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -55,7 +55,7 @@ public class FilesystemPersister extends CommonBase { */ public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ read_channelmonitors(KeysInterface keys_manager) { long ret = bindings.FilesystemPersister_read_channelmonitors(this.ptr, keys_manager == null ? 0 : keys_manager.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret); this.ptrs_to.add(keys_manager); return ret_hu_conv; @@ -67,7 +67,7 @@ public class FilesystemPersister extends CommonBase { */ public Persist as_Persist() { long ret = bindings.FilesystemPersister_as_Persist(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Persist ret_hu_conv = new Persist(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Filter.java b/src/main/java/org/ldk/structs/Filter.java index f1adaa73..bd754f79 100644 --- a/src/main/java/org/ldk/structs/Filter.java +++ b/src/main/java/org/ldk/structs/Filter.java @@ -99,7 +99,7 @@ public class Filter extends CommonBase { */ public Option_C2Tuple_usizeTransactionZZ register_output(WatchedOutput output) { long ret = bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/FundingCreated.java b/src/main/java/org/ldk/structs/FundingCreated.java index 68abbacf..dcf21c2f 100644 --- a/src/main/java/org/ldk/structs/FundingCreated.java +++ b/src/main/java/org/ldk/structs/FundingCreated.java @@ -84,7 +84,7 @@ public class FundingCreated extends CommonBase { */ public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) { long ret = bindings.FundingCreated_new(temporary_channel_id_arg, funding_txid_arg, funding_output_index_arg, signature_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingCreated ret_hu_conv = new FundingCreated(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -95,7 +95,7 @@ public class FundingCreated extends CommonBase { */ public FundingCreated clone() { long ret = bindings.FundingCreated_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingCreated ret_hu_conv = new FundingCreated(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class FundingCreated extends CommonBase { */ public static Result_FundingCreatedDecodeErrorZ read(byte[] ser) { long ret = bindings.FundingCreated_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/FundingLocked.java b/src/main/java/org/ldk/structs/FundingLocked.java index 2208f2f4..1f50eb3a 100644 --- a/src/main/java/org/ldk/structs/FundingLocked.java +++ b/src/main/java/org/ldk/structs/FundingLocked.java @@ -54,7 +54,7 @@ public class FundingLocked extends CommonBase { */ public static FundingLocked of(byte[] channel_id_arg, byte[] next_per_commitment_point_arg) { long ret = bindings.FundingLocked_new(channel_id_arg, next_per_commitment_point_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingLocked ret_hu_conv = new FundingLocked(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -65,7 +65,7 @@ public class FundingLocked extends CommonBase { */ public FundingLocked clone() { long ret = bindings.FundingLocked_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingLocked ret_hu_conv = new FundingLocked(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class FundingLocked extends CommonBase { */ public static Result_FundingLockedDecodeErrorZ read(byte[] ser) { long ret = bindings.FundingLocked_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/FundingSigned.java b/src/main/java/org/ldk/structs/FundingSigned.java index 160e3c5f..198c8886 100644 --- a/src/main/java/org/ldk/structs/FundingSigned.java +++ b/src/main/java/org/ldk/structs/FundingSigned.java @@ -54,7 +54,7 @@ public class FundingSigned extends CommonBase { */ public static FundingSigned of(byte[] channel_id_arg, byte[] signature_arg) { long ret = bindings.FundingSigned_new(channel_id_arg, signature_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingSigned ret_hu_conv = new FundingSigned(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -65,7 +65,7 @@ public class FundingSigned extends CommonBase { */ public FundingSigned clone() { long ret = bindings.FundingSigned_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } FundingSigned ret_hu_conv = new FundingSigned(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class FundingSigned extends CommonBase { */ public static Result_FundingSignedDecodeErrorZ read(byte[] ser) { long ret = bindings.FundingSigned_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/GossipTimestampFilter.java b/src/main/java/org/ldk/structs/GossipTimestampFilter.java index 07c1e6a7..a1dc07a7 100644 --- a/src/main/java/org/ldk/structs/GossipTimestampFilter.java +++ b/src/main/java/org/ldk/structs/GossipTimestampFilter.java @@ -71,7 +71,7 @@ public class GossipTimestampFilter extends CommonBase { */ public static GossipTimestampFilter of(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) { long ret = bindings.GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -82,7 +82,7 @@ public class GossipTimestampFilter extends CommonBase { */ public GossipTimestampFilter clone() { long ret = bindings.GossipTimestampFilter_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -101,7 +101,7 @@ public class GossipTimestampFilter extends CommonBase { */ public static Result_GossipTimestampFilterDecodeErrorZ read(byte[] ser) { long ret = bindings.GossipTimestampFilter_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java index 074cc158..92cf8fdd 100644 --- a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java +++ b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java @@ -94,7 +94,7 @@ public class HTLCOutputInCommitment extends CommonBase { */ public Option_u32Z get_transaction_output_index() { long ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class HTLCOutputInCommitment extends CommonBase { */ public static HTLCOutputInCommitment of(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg) { long ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -125,7 +125,7 @@ public class HTLCOutputInCommitment extends CommonBase { */ public HTLCOutputInCommitment clone() { long ret = bindings.HTLCOutputInCommitment_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -144,7 +144,7 @@ public class HTLCOutputInCommitment extends CommonBase { */ public static Result_HTLCOutputInCommitmentDecodeErrorZ read(byte[] ser) { long ret = bindings.HTLCOutputInCommitment_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/HTLCUpdate.java b/src/main/java/org/ldk/structs/HTLCUpdate.java index 2206a592..105a166a 100644 --- a/src/main/java/org/ldk/structs/HTLCUpdate.java +++ b/src/main/java/org/ldk/structs/HTLCUpdate.java @@ -26,7 +26,7 @@ public class HTLCUpdate extends CommonBase { */ public HTLCUpdate clone() { long ret = bindings.HTLCUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } HTLCUpdate ret_hu_conv = new HTLCUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -45,7 +45,7 @@ public class HTLCUpdate extends CommonBase { */ public static Result_HTLCUpdateDecodeErrorZ read(byte[] ser) { long ret = bindings.HTLCUpdate_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java b/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java index 03d75ba6..9cbd0d70 100644 --- a/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/HolderCommitmentTransaction.java @@ -48,7 +48,7 @@ public class HolderCommitmentTransaction extends CommonBase { */ public HolderCommitmentTransaction clone() { long ret = bindings.HolderCommitmentTransaction_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -67,7 +67,7 @@ public class HolderCommitmentTransaction extends CommonBase { */ public static Result_HolderCommitmentTransactionDecodeErrorZ read(byte[] ser) { long ret = bindings.HolderCommitmentTransaction_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -78,7 +78,7 @@ public class HolderCommitmentTransaction extends CommonBase { */ public static HolderCommitmentTransaction of(CommitmentTransaction commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key) { long ret = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0 : commitment_tx.ptr & ~1, counterparty_sig, counterparty_htlc_sigs, holder_funding_key, counterparty_funding_key); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/IgnoringMessageHandler.java b/src/main/java/org/ldk/structs/IgnoringMessageHandler.java index ddf17fc3..5a9920dc 100644 --- a/src/main/java/org/ldk/structs/IgnoringMessageHandler.java +++ b/src/main/java/org/ldk/structs/IgnoringMessageHandler.java @@ -25,7 +25,7 @@ public class IgnoringMessageHandler extends CommonBase { */ public static IgnoringMessageHandler of() { long ret = bindings.IgnoringMessageHandler_new(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } IgnoringMessageHandler ret_hu_conv = new IgnoringMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -37,7 +37,7 @@ public class IgnoringMessageHandler extends CommonBase { */ public MessageSendEventsProvider as_MessageSendEventsProvider() { long ret = bindings.IgnoringMessageHandler_as_MessageSendEventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -49,7 +49,7 @@ public class IgnoringMessageHandler extends CommonBase { */ public RoutingMessageHandler as_RoutingMessageHandler() { long ret = bindings.IgnoringMessageHandler_as_RoutingMessageHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -61,7 +61,7 @@ public class IgnoringMessageHandler extends CommonBase { */ public CustomMessageReader as_CustomMessageReader() { long ret = bindings.IgnoringMessageHandler_as_CustomMessageReader(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CustomMessageReader ret_hu_conv = new CustomMessageReader(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -73,7 +73,7 @@ public class IgnoringMessageHandler extends CommonBase { */ public CustomMessageHandler as_CustomMessageHandler() { long ret = bindings.IgnoringMessageHandler_as_CustomMessageHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } CustomMessageHandler ret_hu_conv = new CustomMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/InMemorySigner.java b/src/main/java/org/ldk/structs/InMemorySigner.java index 8b355887..832db815 100644 --- a/src/main/java/org/ldk/structs/InMemorySigner.java +++ b/src/main/java/org/ldk/structs/InMemorySigner.java @@ -117,7 +117,7 @@ public class InMemorySigner extends CommonBase { */ public InMemorySigner clone() { long ret = bindings.InMemorySigner_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InMemorySigner ret_hu_conv = new InMemorySigner(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -128,7 +128,7 @@ public class InMemorySigner extends CommonBase { */ public static InMemorySigner of(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, byte[] channel_keys_id) { long ret = bindings.InMemorySigner_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, channel_keys_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InMemorySigner ret_hu_conv = new InMemorySigner(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -140,7 +140,7 @@ public class InMemorySigner extends CommonBase { */ public ChannelPublicKeys counterparty_pubkeys() { long ret = bindings.InMemorySigner_counterparty_pubkeys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -183,7 +183,7 @@ public class InMemorySigner extends CommonBase { */ public OutPoint funding_outpoint() { long ret = bindings.InMemorySigner_funding_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -197,7 +197,7 @@ public class InMemorySigner extends CommonBase { */ public ChannelTransactionParameters get_channel_parameters() { long ret = bindings.InMemorySigner_get_channel_parameters(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -212,7 +212,7 @@ public class InMemorySigner extends CommonBase { */ public Result_CVec_CVec_u8ZZNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, StaticPaymentOutputDescriptor descriptor) { long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(descriptor); return ret_hu_conv; @@ -228,7 +228,7 @@ public class InMemorySigner extends CommonBase { */ public Result_CVec_CVec_u8ZZNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, DelayedPaymentOutputDescriptor descriptor) { long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(descriptor); return ret_hu_conv; @@ -240,7 +240,7 @@ public class InMemorySigner extends CommonBase { */ public BaseSign as_BaseSign() { long ret = bindings.InMemorySigner_as_BaseSign(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BaseSign ret_hu_conv = new BaseSign(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -252,7 +252,7 @@ public class InMemorySigner extends CommonBase { */ public Sign as_Sign() { long ret = bindings.InMemorySigner_as_Sign(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sign ret_hu_conv = new Sign(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -271,7 +271,7 @@ public class InMemorySigner extends CommonBase { */ public static Result_InMemorySignerDecodeErrorZ read(byte[] ser) { long ret = bindings.InMemorySigner_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Init.java b/src/main/java/org/ldk/structs/Init.java index b4e51578..cb6f8727 100644 --- a/src/main/java/org/ldk/structs/Init.java +++ b/src/main/java/org/ldk/structs/Init.java @@ -24,7 +24,7 @@ public class Init extends CommonBase { */ public InitFeatures get_features() { long ret = bindings.Init_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InitFeatures ret_hu_conv = new InitFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -42,7 +42,7 @@ public class Init extends CommonBase { */ public static Init of(InitFeatures features_arg) { long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Init ret_hu_conv = new Init(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -53,7 +53,7 @@ public class Init extends CommonBase { */ public Init clone() { long ret = bindings.Init_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Init ret_hu_conv = new Init(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -72,7 +72,7 @@ public class Init extends CommonBase { */ public static Result_InitDecodeErrorZ read(byte[] ser) { long ret = bindings.Init_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/InitFeatures.java b/src/main/java/org/ldk/structs/InitFeatures.java index 6b89bcb0..6e68f95a 100644 --- a/src/main/java/org/ldk/structs/InitFeatures.java +++ b/src/main/java/org/ldk/structs/InitFeatures.java @@ -35,7 +35,7 @@ public class InitFeatures extends CommonBase { */ public InitFeatures clone() { long ret = bindings.InitFeatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InitFeatures ret_hu_conv = new InitFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -46,7 +46,7 @@ public class InitFeatures extends CommonBase { */ public static InitFeatures empty() { long ret = bindings.InitFeatures_empty(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InitFeatures ret_hu_conv = new InitFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class InitFeatures extends CommonBase { */ public static InitFeatures known() { long ret = bindings.InitFeatures_known(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InitFeatures ret_hu_conv = new InitFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -93,7 +93,7 @@ public class InitFeatures extends CommonBase { */ public static Result_InitFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.InitFeatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/InvalidShutdownScript.java b/src/main/java/org/ldk/structs/InvalidShutdownScript.java index 1d116685..16fe91f1 100644 --- a/src/main/java/org/ldk/structs/InvalidShutdownScript.java +++ b/src/main/java/org/ldk/structs/InvalidShutdownScript.java @@ -43,7 +43,7 @@ public class InvalidShutdownScript extends CommonBase { */ public static InvalidShutdownScript of(byte[] script_arg) { long ret = bindings.InvalidShutdownScript_new(script_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvalidShutdownScript ret_hu_conv = new InvalidShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Invoice.java b/src/main/java/org/ldk/structs/Invoice.java index e848a218..ca8e9c85 100644 --- a/src/main/java/org/ldk/structs/Invoice.java +++ b/src/main/java/org/ldk/structs/Invoice.java @@ -40,7 +40,7 @@ public class Invoice extends CommonBase { */ public Invoice clone() { long ret = bindings.Invoice_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Invoice ret_hu_conv = new Invoice(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -51,7 +51,7 @@ public class Invoice extends CommonBase { */ public SignedRawInvoice into_signed_raw() { long ret = bindings.Invoice_into_signed_raw(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SignedRawInvoice ret_hu_conv = new SignedRawInvoice(null, ret); ret_hu_conv.ptrs_to.add(this); ; @@ -63,7 +63,7 @@ public class Invoice extends CommonBase { */ public Result_NoneSemanticErrorZ check_signature() { long ret = bindings.Invoice_check_signature(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -92,7 +92,7 @@ public class Invoice extends CommonBase { */ public static Result_InvoiceSemanticErrorZ from_signed(SignedRawInvoice signed_invoice) { long ret = bindings.Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -140,7 +140,7 @@ public class Invoice extends CommonBase { @Nullable public InvoiceFeatures features() { long ret = bindings.Invoice_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -214,7 +214,7 @@ public class Invoice extends CommonBase { */ public Option_u64Z amount_pico_btc() { long ret = bindings.Invoice_amount_pico_btc(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -225,7 +225,7 @@ public class Invoice extends CommonBase { */ public static Result_InvoiceNoneZ from_str(java.lang.String s) { long ret = bindings.Invoice_from_str(s); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/InvoiceFeatures.java b/src/main/java/org/ldk/structs/InvoiceFeatures.java index be91f813..3ae93479 100644 --- a/src/main/java/org/ldk/structs/InvoiceFeatures.java +++ b/src/main/java/org/ldk/structs/InvoiceFeatures.java @@ -35,7 +35,7 @@ public class InvoiceFeatures extends CommonBase { */ public InvoiceFeatures clone() { long ret = bindings.InvoiceFeatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -46,7 +46,7 @@ public class InvoiceFeatures extends CommonBase { */ public static InvoiceFeatures empty() { long ret = bindings.InvoiceFeatures_empty(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class InvoiceFeatures extends CommonBase { */ public static InvoiceFeatures known() { long ret = bindings.InvoiceFeatures_known(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -93,7 +93,7 @@ public class InvoiceFeatures extends CommonBase { */ public static Result_InvoiceFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.InvoiceFeatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/InvoiceSignature.java b/src/main/java/org/ldk/structs/InvoiceSignature.java index 9ebc04d7..a08e487d 100644 --- a/src/main/java/org/ldk/structs/InvoiceSignature.java +++ b/src/main/java/org/ldk/structs/InvoiceSignature.java @@ -24,7 +24,7 @@ public class InvoiceSignature extends CommonBase { */ public InvoiceSignature clone() { long ret = bindings.InvoiceSignature_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceSignature ret_hu_conv = new InvoiceSignature(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/KeysInterface.java b/src/main/java/org/ldk/structs/KeysInterface.java index 29d5558d..d74e35b6 100644 --- a/src/main/java/org/ldk/structs/KeysInterface.java +++ b/src/main/java/org/ldk/structs/KeysInterface.java @@ -145,7 +145,7 @@ public class KeysInterface extends CommonBase { */ public ShutdownScript get_shutdown_scriptpubkey() { long ret = bindings.KeysInterface_get_shutdown_scriptpubkey(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -159,7 +159,7 @@ public class KeysInterface extends CommonBase { */ public Sign get_channel_signer(boolean inbound, long channel_value_satoshis) { long ret = bindings.KeysInterface_get_channel_signer(this.ptr, inbound, channel_value_satoshis); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sign ret_hu_conv = new Sign(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -187,7 +187,7 @@ public class KeysInterface extends CommonBase { */ public Result_SignDecodeErrorZ read_chan_signer(byte[] reader) { long ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -200,7 +200,7 @@ public class KeysInterface extends CommonBase { */ public Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage) { long ret = bindings.KeysInterface_sign_invoice(this.ptr, invoice_preimage); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/KeysManager.java b/src/main/java/org/ldk/structs/KeysManager.java index 6f8684ea..1b6e65fd 100644 --- a/src/main/java/org/ldk/structs/KeysManager.java +++ b/src/main/java/org/ldk/structs/KeysManager.java @@ -48,7 +48,7 @@ public class KeysManager extends CommonBase { */ public static KeysManager of(byte[] seed, long starting_time_secs, int starting_time_nanos) { long ret = bindings.KeysManager_new(seed, starting_time_secs, starting_time_nanos); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } KeysManager ret_hu_conv = new KeysManager(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -63,7 +63,7 @@ public class KeysManager extends CommonBase { */ public InMemorySigner derive_channel_keys(long channel_value_satoshis, byte[] params) { long ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InMemorySigner ret_hu_conv = new InMemorySigner(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class KeysManager extends CommonBase { */ public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight) { long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -95,7 +95,7 @@ public class KeysManager extends CommonBase { */ public KeysInterface as_KeysInterface() { long ret = bindings.KeysManager_as_KeysInterface(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } KeysInterface ret_hu_conv = new KeysInterface(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/LightningError.java b/src/main/java/org/ldk/structs/LightningError.java index a14893e8..99ee82cc 100644 --- a/src/main/java/org/ldk/structs/LightningError.java +++ b/src/main/java/org/ldk/structs/LightningError.java @@ -39,7 +39,7 @@ public class LightningError extends CommonBase { */ public ErrorAction get_action() { long ret = bindings.LightningError_get_action(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class LightningError extends CommonBase { */ public static LightningError of(java.lang.String err_arg, ErrorAction action_arg) { long ret = bindings.LightningError_new(err_arg, action_arg.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } LightningError ret_hu_conv = new LightningError(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -68,7 +68,7 @@ public class LightningError extends CommonBase { */ public LightningError clone() { long ret = bindings.LightningError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } LightningError ret_hu_conv = new LightningError(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/MessageHandler.java b/src/main/java/org/ldk/structs/MessageHandler.java index 2e32c5a8..88cb0e2b 100644 --- a/src/main/java/org/ldk/structs/MessageHandler.java +++ b/src/main/java/org/ldk/structs/MessageHandler.java @@ -27,7 +27,7 @@ public class MessageHandler extends CommonBase { */ public ChannelMessageHandler get_chan_handler() { long ret = bindings.MessageHandler_get_chan_handler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -53,7 +53,7 @@ public class MessageHandler extends CommonBase { */ public RoutingMessageHandler get_route_handler() { long ret = bindings.MessageHandler_get_route_handler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -76,7 +76,7 @@ public class MessageHandler extends CommonBase { */ public static MessageHandler of(ChannelMessageHandler chan_handler_arg, RoutingMessageHandler route_handler_arg) { long ret = bindings.MessageHandler_new(chan_handler_arg == null ? 0 : chan_handler_arg.ptr, route_handler_arg == null ? 0 : route_handler_arg.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageHandler ret_hu_conv = new MessageHandler(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(chan_handler_arg); diff --git a/src/main/java/org/ldk/structs/MessageSendEvent.java b/src/main/java/org/ldk/structs/MessageSendEvent.java index 1a0cc081..5cd35d69 100644 --- a/src/main/java/org/ldk/structs/MessageSendEvent.java +++ b/src/main/java/org/ldk/structs/MessageSendEvent.java @@ -422,7 +422,7 @@ public class MessageSendEvent extends CommonBase { */ public MessageSendEvent clone() { long ret = bindings.MessageSendEvent_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -433,7 +433,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_accept_channel(byte[] node_id, AcceptChannel msg) { long ret = bindings.MessageSendEvent_send_accept_channel(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -444,7 +444,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_open_channel(byte[] node_id, OpenChannel msg) { long ret = bindings.MessageSendEvent_send_open_channel(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -455,7 +455,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_funding_created(byte[] node_id, FundingCreated msg) { long ret = bindings.MessageSendEvent_send_funding_created(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -466,7 +466,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_funding_signed(byte[] node_id, FundingSigned msg) { long ret = bindings.MessageSendEvent_send_funding_signed(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -477,7 +477,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_funding_locked(byte[] node_id, FundingLocked msg) { long ret = bindings.MessageSendEvent_send_funding_locked(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -488,7 +488,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_announcement_signatures(byte[] node_id, AnnouncementSignatures msg) { long ret = bindings.MessageSendEvent_send_announcement_signatures(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -499,7 +499,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent update_htlcs(byte[] node_id, CommitmentUpdate updates) { long ret = bindings.MessageSendEvent_update_htlcs(node_id, updates == null ? 0 : updates.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -510,7 +510,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_revoke_and_ack(byte[] node_id, RevokeAndACK msg) { long ret = bindings.MessageSendEvent_send_revoke_and_ack(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -521,7 +521,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_closing_signed(byte[] node_id, ClosingSigned msg) { long ret = bindings.MessageSendEvent_send_closing_signed(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -532,7 +532,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_shutdown(byte[] node_id, Shutdown msg) { long ret = bindings.MessageSendEvent_send_shutdown(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -543,7 +543,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_channel_reestablish(byte[] node_id, ChannelReestablish msg) { long ret = bindings.MessageSendEvent_send_channel_reestablish(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -554,7 +554,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent broadcast_channel_announcement(ChannelAnnouncement msg, ChannelUpdate update_msg) { long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr & ~1, update_msg == null ? 0 : update_msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -565,7 +565,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent broadcast_node_announcement(NodeAnnouncement msg) { long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -576,7 +576,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent broadcast_channel_update(ChannelUpdate msg) { long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -587,7 +587,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_channel_update(byte[] node_id, ChannelUpdate msg) { long ret = bindings.MessageSendEvent_send_channel_update(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -598,7 +598,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent handle_error(byte[] node_id, ErrorAction action) { long ret = bindings.MessageSendEvent_handle_error(node_id, action.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -609,7 +609,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_channel_range_query(byte[] node_id, QueryChannelRange msg) { long ret = bindings.MessageSendEvent_send_channel_range_query(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -620,7 +620,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_short_ids_query(byte[] node_id, QueryShortChannelIds msg) { long ret = bindings.MessageSendEvent_send_short_ids_query(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -631,7 +631,7 @@ public class MessageSendEvent extends CommonBase { */ public static MessageSendEvent send_reply_channel_range(byte[] node_id, ReplyChannelRange msg) { long ret = bindings.MessageSendEvent_send_reply_channel_range(node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEvent ret_hu_conv = MessageSendEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/MinFinalCltvExpiry.java b/src/main/java/org/ldk/structs/MinFinalCltvExpiry.java index 0556b9ae..eca27bc3 100644 --- a/src/main/java/org/ldk/structs/MinFinalCltvExpiry.java +++ b/src/main/java/org/ldk/structs/MinFinalCltvExpiry.java @@ -24,7 +24,7 @@ public class MinFinalCltvExpiry extends CommonBase { */ public MinFinalCltvExpiry clone() { long ret = bindings.MinFinalCltvExpiry_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MinFinalCltvExpiry ret_hu_conv = new MinFinalCltvExpiry(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/MonitorEvent.java b/src/main/java/org/ldk/structs/MonitorEvent.java index b3df4eb4..2b2acb83 100644 --- a/src/main/java/org/ldk/structs/MonitorEvent.java +++ b/src/main/java/org/ldk/structs/MonitorEvent.java @@ -54,7 +54,7 @@ public class MonitorEvent extends CommonBase { */ public MonitorEvent clone() { long ret = bindings.MonitorEvent_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -65,7 +65,7 @@ public class MonitorEvent extends CommonBase { */ public static MonitorEvent htlcevent(HTLCUpdate a) { long ret = bindings.MonitorEvent_htlcevent(a == null ? 0 : a.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -76,7 +76,7 @@ public class MonitorEvent extends CommonBase { */ public static MonitorEvent commitment_tx_confirmed(OutPoint a) { long ret = bindings.MonitorEvent_commitment_tx_confirmed(a == null ? 0 : a.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MonitorEvent ret_hu_conv = MonitorEvent.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/MonitorUpdateError.java b/src/main/java/org/ldk/structs/MonitorUpdateError.java index 63fdecb5..133845be 100644 --- a/src/main/java/org/ldk/structs/MonitorUpdateError.java +++ b/src/main/java/org/ldk/structs/MonitorUpdateError.java @@ -28,7 +28,7 @@ public class MonitorUpdateError extends CommonBase { */ public MonitorUpdateError clone() { long ret = bindings.MonitorUpdateError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MonitorUpdateError ret_hu_conv = new MonitorUpdateError(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/NetAddress.java b/src/main/java/org/ldk/structs/NetAddress.java index 420d9bb5..2a253954 100644 --- a/src/main/java/org/ldk/structs/NetAddress.java +++ b/src/main/java/org/ldk/structs/NetAddress.java @@ -110,7 +110,7 @@ public class NetAddress extends CommonBase { */ public NetAddress clone() { long ret = bindings.NetAddress_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -121,7 +121,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress ipv4(byte[] addr, short port) { long ret = bindings.NetAddress_ipv4(addr, port); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -132,7 +132,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress ipv6(byte[] addr, short port) { long ret = bindings.NetAddress_ipv6(addr, port); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -143,7 +143,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress onion_v2(byte[] addr, short port) { long ret = bindings.NetAddress_onion_v2(addr, port); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -154,7 +154,7 @@ public class NetAddress extends CommonBase { */ public static NetAddress onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port) { long ret = bindings.NetAddress_onion_v3(ed25519_pubkey, checksum, version, port); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -173,7 +173,7 @@ public class NetAddress extends CommonBase { */ public static Result_NetAddressDecodeErrorZ read(byte[] ser) { long ret = bindings.NetAddress_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/NetGraphMsgHandler.java b/src/main/java/org/ldk/structs/NetGraphMsgHandler.java index 9807294b..72f6a8df 100644 --- a/src/main/java/org/ldk/structs/NetGraphMsgHandler.java +++ b/src/main/java/org/ldk/structs/NetGraphMsgHandler.java @@ -32,7 +32,7 @@ public class NetGraphMsgHandler extends CommonBase { */ public EventHandler as_EventHandler() { long ret = bindings.NetGraphMsgHandler_as_EventHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } EventHandler ret_hu_conv = new EventHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -43,7 +43,7 @@ public class NetGraphMsgHandler extends CommonBase { */ public NetworkGraph get_network_graph() { long ret = bindings.NetGraphMsgHandler_get_network_graph(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkGraph ret_hu_conv = new NetworkGraph(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -65,7 +65,7 @@ public class NetGraphMsgHandler extends CommonBase { */ public static NetGraphMsgHandler of(NetworkGraph network_graph, Option_AccessZ chain_access, Logger logger) { long ret = bindings.NetGraphMsgHandler_new(network_graph == null ? 0 : network_graph.ptr & ~1, chain_access.ptr, logger == null ? 0 : logger.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(logger); @@ -87,7 +87,7 @@ public class NetGraphMsgHandler extends CommonBase { */ public RoutingMessageHandler as_RoutingMessageHandler() { long ret = bindings.NetGraphMsgHandler_as_RoutingMessageHandler(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -99,7 +99,7 @@ public class NetGraphMsgHandler extends CommonBase { */ public MessageSendEventsProvider as_MessageSendEventsProvider() { long ret = bindings.NetGraphMsgHandler_as_MessageSendEventsProvider(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/NetworkGraph.java b/src/main/java/org/ldk/structs/NetworkGraph.java index 98c99609..0c3c3c38 100644 --- a/src/main/java/org/ldk/structs/NetworkGraph.java +++ b/src/main/java/org/ldk/structs/NetworkGraph.java @@ -24,7 +24,7 @@ public class NetworkGraph extends CommonBase { */ public NetworkGraph clone() { long ret = bindings.NetworkGraph_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkGraph ret_hu_conv = new NetworkGraph(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -43,7 +43,7 @@ public class NetworkGraph extends CommonBase { */ public static Result_NetworkGraphDecodeErrorZ read(byte[] ser) { long ret = bindings.NetworkGraph_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class NetworkGraph extends CommonBase { */ public static NetworkGraph of(byte[] genesis_hash) { long ret = bindings.NetworkGraph_new(genesis_hash); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkGraph ret_hu_conv = new NetworkGraph(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -64,7 +64,7 @@ public class NetworkGraph extends CommonBase { */ public ReadOnlyNetworkGraph read_only() { long ret = bindings.NetworkGraph_read_only(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ReadOnlyNetworkGraph ret_hu_conv = new ReadOnlyNetworkGraph(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -80,7 +80,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_node_from_announcement(NodeAnnouncement msg) { long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -94,7 +94,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_node_from_unsigned_announcement(UnsignedNodeAnnouncement msg) { long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -112,7 +112,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_channel_from_announcement(ChannelAnnouncement msg, Option_AccessZ chain_access) { long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1, chain_access.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -128,7 +128,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_channel_from_unsigned_announcement(UnsignedChannelAnnouncement msg, Option_AccessZ chain_access) { long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1, chain_access.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -161,7 +161,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_channel(ChannelUpdate msg) { long ret = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -174,7 +174,7 @@ public class NetworkGraph extends CommonBase { */ public Result_NoneLightningErrorZ update_channel_unsigned(UnsignedChannelUpdate msg) { long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/NetworkUpdate.java b/src/main/java/org/ldk/structs/NetworkUpdate.java index d79ad07f..4c48c305 100644 --- a/src/main/java/org/ldk/structs/NetworkUpdate.java +++ b/src/main/java/org/ldk/structs/NetworkUpdate.java @@ -85,7 +85,7 @@ public class NetworkUpdate extends CommonBase { */ public NetworkUpdate clone() { long ret = bindings.NetworkUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -96,7 +96,7 @@ public class NetworkUpdate extends CommonBase { */ public static NetworkUpdate channel_update_message(ChannelUpdate msg) { long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -107,7 +107,7 @@ public class NetworkUpdate extends CommonBase { */ public static NetworkUpdate channel_closed(long short_channel_id, boolean is_permanent) { long ret = bindings.NetworkUpdate_channel_closed(short_channel_id, is_permanent); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -118,7 +118,7 @@ public class NetworkUpdate extends CommonBase { */ public static NetworkUpdate node_failure(byte[] node_id, boolean is_permanent) { long ret = bindings.NetworkUpdate_node_failure(node_id, is_permanent); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NetworkUpdate ret_hu_conv = NetworkUpdate.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/NodeAnnouncement.java b/src/main/java/org/ldk/structs/NodeAnnouncement.java index ed6aa6c2..8c65c84e 100644 --- a/src/main/java/org/ldk/structs/NodeAnnouncement.java +++ b/src/main/java/org/ldk/structs/NodeAnnouncement.java @@ -39,7 +39,7 @@ public class NodeAnnouncement extends CommonBase { */ public UnsignedNodeAnnouncement get_contents() { long ret = bindings.NodeAnnouncement_get_contents(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class NodeAnnouncement extends CommonBase { */ public static NodeAnnouncement of(byte[] signature_arg, UnsignedNodeAnnouncement contents_arg) { long ret = bindings.NodeAnnouncement_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -68,7 +68,7 @@ public class NodeAnnouncement extends CommonBase { */ public NodeAnnouncement clone() { long ret = bindings.NodeAnnouncement_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -87,7 +87,7 @@ public class NodeAnnouncement extends CommonBase { */ public static Result_NodeAnnouncementDecodeErrorZ read(byte[] ser) { long ret = bindings.NodeAnnouncement_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java b/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java index b8c2ce63..040e8719 100644 --- a/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java +++ b/src/main/java/org/ldk/structs/NodeAnnouncementInfo.java @@ -24,7 +24,7 @@ public class NodeAnnouncementInfo extends CommonBase { */ public NodeFeatures get_features() { long ret = bindings.NodeAnnouncementInfo_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -106,7 +106,7 @@ public class NodeAnnouncementInfo extends CommonBase { @Nullable public NodeAnnouncement get_announcement_message() { long ret = bindings.NodeAnnouncementInfo_get_announcement_message(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -129,7 +129,7 @@ public class NodeAnnouncementInfo extends CommonBase { */ public static NodeAnnouncementInfo of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) { long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, addresses_arg != null ? Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_12 -> addresses_arg_conv_12.ptr).toArray() : null, announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -140,7 +140,7 @@ public class NodeAnnouncementInfo extends CommonBase { */ public NodeAnnouncementInfo clone() { long ret = bindings.NodeAnnouncementInfo_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -159,7 +159,7 @@ public class NodeAnnouncementInfo extends CommonBase { */ public static Result_NodeAnnouncementInfoDecodeErrorZ read(byte[] ser) { long ret = bindings.NodeAnnouncementInfo_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/NodeFeatures.java b/src/main/java/org/ldk/structs/NodeFeatures.java index 75134c92..c4110930 100644 --- a/src/main/java/org/ldk/structs/NodeFeatures.java +++ b/src/main/java/org/ldk/structs/NodeFeatures.java @@ -35,7 +35,7 @@ public class NodeFeatures extends CommonBase { */ public NodeFeatures clone() { long ret = bindings.NodeFeatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -46,7 +46,7 @@ public class NodeFeatures extends CommonBase { */ public static NodeFeatures empty() { long ret = bindings.NodeFeatures_empty(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class NodeFeatures extends CommonBase { */ public static NodeFeatures known() { long ret = bindings.NodeFeatures_known(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -93,7 +93,7 @@ public class NodeFeatures extends CommonBase { */ public static Result_NodeFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.NodeFeatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/NodeInfo.java b/src/main/java/org/ldk/structs/NodeInfo.java index 098502e8..ad0b4848 100644 --- a/src/main/java/org/ldk/structs/NodeInfo.java +++ b/src/main/java/org/ldk/structs/NodeInfo.java @@ -36,7 +36,7 @@ public class NodeInfo extends CommonBase { @Nullable public RoutingFees get_lowest_inbound_channel_fees() { long ret = bindings.NodeInfo_get_lowest_inbound_channel_fees(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingFees ret_hu_conv = new RoutingFees(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -63,7 +63,7 @@ public class NodeInfo extends CommonBase { @Nullable public NodeAnnouncementInfo get_announcement_info() { long ret = bindings.NodeInfo_get_announcement_info(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -85,7 +85,7 @@ public class NodeInfo extends CommonBase { */ public static NodeInfo of(long[] channels_arg, RoutingFees lowest_inbound_channel_fees_arg, NodeAnnouncementInfo announcement_info_arg) { long ret = bindings.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg == null ? 0 : lowest_inbound_channel_fees_arg.ptr & ~1, announcement_info_arg == null ? 0 : announcement_info_arg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeInfo ret_hu_conv = new NodeInfo(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -96,7 +96,7 @@ public class NodeInfo extends CommonBase { */ public NodeInfo clone() { long ret = bindings.NodeInfo_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeInfo ret_hu_conv = new NodeInfo(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -115,7 +115,7 @@ public class NodeInfo extends CommonBase { */ public static Result_NodeInfoDecodeErrorZ read(byte[] ser) { long ret = bindings.NodeInfo_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/OpenChannel.java b/src/main/java/org/ldk/structs/OpenChannel.java index 0475b023..19231f67 100644 --- a/src/main/java/org/ldk/structs/OpenChannel.java +++ b/src/main/java/org/ldk/structs/OpenChannel.java @@ -294,7 +294,7 @@ public class OpenChannel extends CommonBase { */ public OpenChannel clone() { long ret = bindings.OpenChannel_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OpenChannel ret_hu_conv = new OpenChannel(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -313,7 +313,7 @@ public class OpenChannel extends CommonBase { */ public static Result_OpenChannelDecodeErrorZ read(byte[] ser) { long ret = bindings.OpenChannel_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Option_AccessZ.java b/src/main/java/org/ldk/structs/Option_AccessZ.java index 3c032cc7..8ddfe8cd 100644 --- a/src/main/java/org/ldk/structs/Option_AccessZ.java +++ b/src/main/java/org/ldk/structs/Option_AccessZ.java @@ -49,7 +49,7 @@ public class Option_AccessZ extends CommonBase { */ public static Option_AccessZ some(Access o) { long ret = bindings.COption_AccessZ_some(o == null ? 0 : o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(o); @@ -61,7 +61,7 @@ public class Option_AccessZ extends CommonBase { */ public static Option_AccessZ none() { long ret = bindings.COption_AccessZ_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_AccessZ ret_hu_conv = Option_AccessZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java b/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java index 518a85dd..597c17a0 100644 --- a/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java +++ b/src/main/java/org/ldk/structs/Option_C2Tuple_usizeTransactionZZ.java @@ -49,7 +49,7 @@ public class Option_C2Tuple_usizeTransactionZZ extends CommonBase { */ public static Option_C2Tuple_usizeTransactionZZ some(TwoTuple_usizeTransactionZ o) { long ret = bindings.COption_C2Tuple_usizeTransactionZZ_some(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -60,7 +60,7 @@ public class Option_C2Tuple_usizeTransactionZZ extends CommonBase { */ public static Option_C2Tuple_usizeTransactionZZ none() { long ret = bindings.COption_C2Tuple_usizeTransactionZZ_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -72,7 +72,7 @@ public class Option_C2Tuple_usizeTransactionZZ extends CommonBase { */ public Option_C2Tuple_usizeTransactionZZ clone() { long ret = bindings.COption_C2Tuple_usizeTransactionZZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_C2Tuple_usizeTransactionZZ ret_hu_conv = Option_C2Tuple_usizeTransactionZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_FilterZ.java b/src/main/java/org/ldk/structs/Option_FilterZ.java index 117215e1..2aa00915 100644 --- a/src/main/java/org/ldk/structs/Option_FilterZ.java +++ b/src/main/java/org/ldk/structs/Option_FilterZ.java @@ -49,7 +49,7 @@ public class Option_FilterZ extends CommonBase { */ public static Option_FilterZ some(Filter o) { long ret = bindings.COption_FilterZ_some(o == null ? 0 : o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(o); @@ -61,7 +61,7 @@ public class Option_FilterZ extends CommonBase { */ public static Option_FilterZ none() { long ret = bindings.COption_FilterZ_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_NetworkUpdateZ.java b/src/main/java/org/ldk/structs/Option_NetworkUpdateZ.java index 248c150c..37435f06 100644 --- a/src/main/java/org/ldk/structs/Option_NetworkUpdateZ.java +++ b/src/main/java/org/ldk/structs/Option_NetworkUpdateZ.java @@ -49,7 +49,7 @@ public class Option_NetworkUpdateZ extends CommonBase { */ public static Option_NetworkUpdateZ some(NetworkUpdate o) { long ret = bindings.COption_NetworkUpdateZ_some(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -60,7 +60,7 @@ public class Option_NetworkUpdateZ extends CommonBase { */ public static Option_NetworkUpdateZ none() { long ret = bindings.COption_NetworkUpdateZ_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -72,7 +72,7 @@ public class Option_NetworkUpdateZ extends CommonBase { */ public Option_NetworkUpdateZ clone() { long ret = bindings.COption_NetworkUpdateZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_NetworkUpdateZ ret_hu_conv = Option_NetworkUpdateZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_TypeZ.java b/src/main/java/org/ldk/structs/Option_TypeZ.java index cb1b3e78..8df2c994 100644 --- a/src/main/java/org/ldk/structs/Option_TypeZ.java +++ b/src/main/java/org/ldk/structs/Option_TypeZ.java @@ -49,7 +49,7 @@ public class Option_TypeZ extends CommonBase { */ public static Option_TypeZ some(Type o) { long ret = bindings.COption_TypeZ_some(o == null ? 0 : o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(o); @@ -61,7 +61,7 @@ public class Option_TypeZ extends CommonBase { */ public static Option_TypeZ none() { long ret = bindings.COption_TypeZ_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -73,7 +73,7 @@ public class Option_TypeZ extends CommonBase { */ public Option_TypeZ clone() { long ret = bindings.COption_TypeZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_TypeZ ret_hu_conv = Option_TypeZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_u16Z.java b/src/main/java/org/ldk/structs/Option_u16Z.java index 89aa6ad2..4068a379 100644 --- a/src/main/java/org/ldk/structs/Option_u16Z.java +++ b/src/main/java/org/ldk/structs/Option_u16Z.java @@ -46,7 +46,7 @@ public class Option_u16Z extends CommonBase { */ public static Option_u16Z some(short o) { long ret = bindings.COption_u16Z_some(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class Option_u16Z extends CommonBase { */ public static Option_u16Z none() { long ret = bindings.COption_u16Z_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -69,7 +69,7 @@ public class Option_u16Z extends CommonBase { */ public Option_u16Z clone() { long ret = bindings.COption_u16Z_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u16Z ret_hu_conv = Option_u16Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_u32Z.java b/src/main/java/org/ldk/structs/Option_u32Z.java index dd6d36ea..8e488657 100644 --- a/src/main/java/org/ldk/structs/Option_u32Z.java +++ b/src/main/java/org/ldk/structs/Option_u32Z.java @@ -46,7 +46,7 @@ public class Option_u32Z extends CommonBase { */ public static Option_u32Z some(int o) { long ret = bindings.COption_u32Z_some(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class Option_u32Z extends CommonBase { */ public static Option_u32Z none() { long ret = bindings.COption_u32Z_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -69,7 +69,7 @@ public class Option_u32Z extends CommonBase { */ public Option_u32Z clone() { long ret = bindings.COption_u32Z_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Option_u64Z.java b/src/main/java/org/ldk/structs/Option_u64Z.java index f05c62d6..3de70c69 100644 --- a/src/main/java/org/ldk/structs/Option_u64Z.java +++ b/src/main/java/org/ldk/structs/Option_u64Z.java @@ -46,7 +46,7 @@ public class Option_u64Z extends CommonBase { */ public static Option_u64Z some(long o) { long ret = bindings.COption_u64Z_some(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class Option_u64Z extends CommonBase { */ public static Option_u64Z none() { long ret = bindings.COption_u64Z_none(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -69,7 +69,7 @@ public class Option_u64Z extends CommonBase { */ public Option_u64Z clone() { long ret = bindings.COption_u64Z_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/OutPoint.java b/src/main/java/org/ldk/structs/OutPoint.java index 0a8ba429..0fc805c8 100644 --- a/src/main/java/org/ldk/structs/OutPoint.java +++ b/src/main/java/org/ldk/structs/OutPoint.java @@ -57,7 +57,7 @@ public class OutPoint extends CommonBase { */ public static OutPoint of(byte[] txid_arg, short index_arg) { long ret = bindings.OutPoint_new(txid_arg, index_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -68,7 +68,7 @@ public class OutPoint extends CommonBase { */ public OutPoint clone() { long ret = bindings.OutPoint_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class OutPoint extends CommonBase { */ public static Result_OutPointDecodeErrorZ read(byte[] ser) { long ret = bindings.OutPoint_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/PayeePubKey.java b/src/main/java/org/ldk/structs/PayeePubKey.java index b6ea267f..b1251eb7 100644 --- a/src/main/java/org/ldk/structs/PayeePubKey.java +++ b/src/main/java/org/ldk/structs/PayeePubKey.java @@ -24,7 +24,7 @@ public class PayeePubKey extends CommonBase { */ public PayeePubKey clone() { long ret = bindings.PayeePubKey_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PayeePubKey ret_hu_conv = new PayeePubKey(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/PaymentPurpose.java b/src/main/java/org/ldk/structs/PaymentPurpose.java index e2654da5..abc8a675 100644 --- a/src/main/java/org/ldk/structs/PaymentPurpose.java +++ b/src/main/java/org/ldk/structs/PaymentPurpose.java @@ -85,7 +85,7 @@ public class PaymentPurpose extends CommonBase { */ public PaymentPurpose clone() { long ret = bindings.PaymentPurpose_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentPurpose ret_hu_conv = PaymentPurpose.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -96,7 +96,7 @@ public class PaymentPurpose extends CommonBase { */ public static PaymentPurpose invoice_payment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id) { long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage, payment_secret, user_payment_id); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentPurpose ret_hu_conv = PaymentPurpose.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -107,7 +107,7 @@ public class PaymentPurpose extends CommonBase { */ public static PaymentPurpose spontaneous_payment(byte[] a) { long ret = bindings.PaymentPurpose_spontaneous_payment(a); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentPurpose ret_hu_conv = PaymentPurpose.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/PaymentSendFailure.java b/src/main/java/org/ldk/structs/PaymentSendFailure.java index ea51eb03..9f159e2c 100644 --- a/src/main/java/org/ldk/structs/PaymentSendFailure.java +++ b/src/main/java/org/ldk/structs/PaymentSendFailure.java @@ -95,7 +95,7 @@ public class PaymentSendFailure extends CommonBase { */ public PaymentSendFailure clone() { long ret = bindings.PaymentSendFailure_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -106,7 +106,7 @@ public class PaymentSendFailure extends CommonBase { */ public static PaymentSendFailure parameter_error(APIError a) { long ret = bindings.PaymentSendFailure_parameter_error(a.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -117,7 +117,7 @@ public class PaymentSendFailure extends CommonBase { */ public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a) { long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -128,7 +128,7 @@ public class PaymentSendFailure extends CommonBase { */ public static PaymentSendFailure all_failed_retry_safe(APIError[] a) { long ret = bindings.PaymentSendFailure_all_failed_retry_safe(a != null ? Arrays.stream(a).mapToLong(a_conv_10 -> a_conv_10.ptr).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -139,7 +139,7 @@ public class PaymentSendFailure extends CommonBase { */ public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] a) { long ret = bindings.PaymentSendFailure_partial_failure(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PaymentSendFailure ret_hu_conv = PaymentSendFailure.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/PeerHandleError.java b/src/main/java/org/ldk/structs/PeerHandleError.java index 1814e943..a398ddb6 100644 --- a/src/main/java/org/ldk/structs/PeerHandleError.java +++ b/src/main/java/org/ldk/structs/PeerHandleError.java @@ -43,7 +43,7 @@ public class PeerHandleError extends CommonBase { */ public static PeerHandleError of(boolean no_connection_possible_arg) { long ret = bindings.PeerHandleError_new(no_connection_possible_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PeerHandleError ret_hu_conv = new PeerHandleError(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -54,7 +54,7 @@ public class PeerHandleError extends CommonBase { */ public PeerHandleError clone() { long ret = bindings.PeerHandleError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PeerHandleError ret_hu_conv = new PeerHandleError(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/PeerManager.java b/src/main/java/org/ldk/structs/PeerManager.java index 0d3aecac..285ac3bc 100644 --- a/src/main/java/org/ldk/structs/PeerManager.java +++ b/src/main/java/org/ldk/structs/PeerManager.java @@ -44,7 +44,7 @@ public class PeerManager extends CommonBase { */ public static PeerManager of(ChannelMessageHandler message_handler_chan_handler_arg, RoutingMessageHandler message_handler_route_handler_arg, byte[] our_node_secret, byte[] ephemeral_random_data, Logger logger, CustomMessageHandler custom_message_handler) { long ret = bindings.PeerManager_new(bindings.MessageHandler_new(message_handler_chan_handler_arg == null ? 0 : message_handler_chan_handler_arg.ptr, message_handler_route_handler_arg == null ? 0 : message_handler_route_handler_arg.ptr), our_node_secret, ephemeral_random_data, logger == null ? 0 : logger.ptr, custom_message_handler == null ? 0 : custom_message_handler.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PeerManager ret_hu_conv = new PeerManager(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(message_handler_chan_handler_arg); @@ -80,7 +80,7 @@ public class PeerManager extends CommonBase { */ public Result_CVec_u8ZPeerHandleErrorZ new_outbound_connection(byte[] their_node_id, SocketDescriptor descriptor) { long ret = bindings.PeerManager_new_outbound_connection(this.ptr, their_node_id, descriptor == null ? 0 : descriptor.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); this.ptrs_to.add(descriptor); return ret_hu_conv; @@ -101,7 +101,7 @@ public class PeerManager extends CommonBase { */ public Result_NonePeerHandleErrorZ new_inbound_connection(SocketDescriptor descriptor) { long ret = bindings.PeerManager_new_inbound_connection(this.ptr, descriptor == null ? 0 : descriptor.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); this.ptrs_to.add(descriptor); return ret_hu_conv; @@ -123,7 +123,7 @@ public class PeerManager extends CommonBase { */ public Result_NonePeerHandleErrorZ write_buffer_space_avail(SocketDescriptor descriptor) { long ret = bindings.PeerManager_write_buffer_space_avail(this.ptr, descriptor == null ? 0 : descriptor.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -146,7 +146,7 @@ public class PeerManager extends CommonBase { */ public Result_boolPeerHandleErrorZ read_event(SocketDescriptor peer_descriptor, byte[] data) { long ret = bindings.PeerManager_read_event(this.ptr, peer_descriptor == null ? 0 : peer_descriptor.ptr, data); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Persist.java b/src/main/java/org/ldk/structs/Persist.java index 427a446c..1ed509f4 100644 --- a/src/main/java/org/ldk/structs/Persist.java +++ b/src/main/java/org/ldk/structs/Persist.java @@ -107,7 +107,7 @@ public class Persist extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ persist_new_channel(OutPoint id, ChannelMonitor data) { long ret = bindings.Persist_persist_new_channel(this.ptr, id == null ? 0 : id.ptr & ~1, data == null ? 0 : data.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); this.ptrs_to.add(data); return ret_hu_conv; @@ -139,7 +139,7 @@ public class Persist extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data) { long ret = bindings.Persist_update_persisted_channel(this.ptr, id == null ? 0 : id.ptr & ~1, update == null ? 0 : update.ptr & ~1, data == null ? 0 : data.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); this.ptrs_to.add(update); this.ptrs_to.add(data); diff --git a/src/main/java/org/ldk/structs/Ping.java b/src/main/java/org/ldk/structs/Ping.java index 20fd5519..6c17f2fb 100644 --- a/src/main/java/org/ldk/structs/Ping.java +++ b/src/main/java/org/ldk/structs/Ping.java @@ -56,7 +56,7 @@ public class Ping extends CommonBase { */ public static Ping of(short ponglen_arg, short byteslen_arg) { long ret = bindings.Ping_new(ponglen_arg, byteslen_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Ping ret_hu_conv = new Ping(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -67,7 +67,7 @@ public class Ping extends CommonBase { */ public Ping clone() { long ret = bindings.Ping_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Ping ret_hu_conv = new Ping(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -86,7 +86,7 @@ public class Ping extends CommonBase { */ public static Result_PingDecodeErrorZ read(byte[] ser) { long ret = bindings.Ping_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Pong.java b/src/main/java/org/ldk/structs/Pong.java index 908c064b..0ca9c7ea 100644 --- a/src/main/java/org/ldk/structs/Pong.java +++ b/src/main/java/org/ldk/structs/Pong.java @@ -41,7 +41,7 @@ public class Pong extends CommonBase { */ public static Pong of(short byteslen_arg) { long ret = bindings.Pong_new(byteslen_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Pong ret_hu_conv = new Pong(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -52,7 +52,7 @@ public class Pong extends CommonBase { */ public Pong clone() { long ret = bindings.Pong_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Pong ret_hu_conv = new Pong(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -71,7 +71,7 @@ public class Pong extends CommonBase { */ public static Result_PongDecodeErrorZ read(byte[] ser) { long ret = bindings.Pong_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/PositiveTimestamp.java b/src/main/java/org/ldk/structs/PositiveTimestamp.java index fea0ba86..81db6083 100644 --- a/src/main/java/org/ldk/structs/PositiveTimestamp.java +++ b/src/main/java/org/ldk/structs/PositiveTimestamp.java @@ -40,7 +40,7 @@ public class PositiveTimestamp extends CommonBase { */ public PositiveTimestamp clone() { long ret = bindings.PositiveTimestamp_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PositiveTimestamp ret_hu_conv = new PositiveTimestamp(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -53,7 +53,7 @@ public class PositiveTimestamp extends CommonBase { */ public static Result_PositiveTimestampCreationErrorZ from_unix_timestamp(long unix_seconds) { long ret = bindings.PositiveTimestamp_from_unix_timestamp(unix_seconds); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -65,7 +65,7 @@ public class PositiveTimestamp extends CommonBase { */ public static Result_PositiveTimestampCreationErrorZ from_system_time(long time) { long ret = bindings.PositiveTimestamp_from_system_time(time); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/PrivateRoute.java b/src/main/java/org/ldk/structs/PrivateRoute.java index 51c84d98..2c9931ad 100644 --- a/src/main/java/org/ldk/structs/PrivateRoute.java +++ b/src/main/java/org/ldk/structs/PrivateRoute.java @@ -27,7 +27,7 @@ public class PrivateRoute extends CommonBase { */ public PrivateRoute clone() { long ret = bindings.PrivateRoute_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PrivateRoute ret_hu_conv = new PrivateRoute(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class PrivateRoute extends CommonBase { */ public static Result_PrivateRouteCreationErrorZ of(RouteHint hops) { long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class PrivateRoute extends CommonBase { */ public RouteHint into_inner() { long ret = bindings.PrivateRoute_into_inner(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHint ret_hu_conv = new RouteHint(null, ret); ret_hu_conv.ptrs_to.add(this); ; diff --git a/src/main/java/org/ldk/structs/QueryChannelRange.java b/src/main/java/org/ldk/structs/QueryChannelRange.java index 3fa87188..97fd5401 100644 --- a/src/main/java/org/ldk/structs/QueryChannelRange.java +++ b/src/main/java/org/ldk/structs/QueryChannelRange.java @@ -72,7 +72,7 @@ public class QueryChannelRange extends CommonBase { */ public static QueryChannelRange of(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) { long ret = bindings.QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -83,7 +83,7 @@ public class QueryChannelRange extends CommonBase { */ public QueryChannelRange clone() { long ret = bindings.QueryChannelRange_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -110,7 +110,7 @@ public class QueryChannelRange extends CommonBase { */ public static Result_QueryChannelRangeDecodeErrorZ read(byte[] ser) { long ret = bindings.QueryChannelRange_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/QueryShortChannelIds.java b/src/main/java/org/ldk/structs/QueryShortChannelIds.java index ee23d753..2b31c9b9 100644 --- a/src/main/java/org/ldk/structs/QueryShortChannelIds.java +++ b/src/main/java/org/ldk/structs/QueryShortChannelIds.java @@ -53,7 +53,7 @@ public class QueryShortChannelIds extends CommonBase { */ public static QueryShortChannelIds of(byte[] chain_hash_arg, long[] short_channel_ids_arg) { long ret = bindings.QueryShortChannelIds_new(chain_hash_arg, short_channel_ids_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -64,7 +64,7 @@ public class QueryShortChannelIds extends CommonBase { */ public QueryShortChannelIds clone() { long ret = bindings.QueryShortChannelIds_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -75,7 +75,7 @@ public class QueryShortChannelIds extends CommonBase { */ public static Result_QueryShortChannelIdsDecodeErrorZ read(byte[] ser) { long ret = bindings.QueryShortChannelIds_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RawDataPart.java b/src/main/java/org/ldk/structs/RawDataPart.java index 2d66354a..d89766b7 100644 --- a/src/main/java/org/ldk/structs/RawDataPart.java +++ b/src/main/java/org/ldk/structs/RawDataPart.java @@ -24,7 +24,7 @@ public class RawDataPart extends CommonBase { */ public PositiveTimestamp get_timestamp() { long ret = bindings.RawDataPart_get_timestamp(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PositiveTimestamp ret_hu_conv = new PositiveTimestamp(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -53,7 +53,7 @@ public class RawDataPart extends CommonBase { */ public RawDataPart clone() { long ret = bindings.RawDataPart_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RawDataPart ret_hu_conv = new RawDataPart(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/RawInvoice.java b/src/main/java/org/ldk/structs/RawInvoice.java index e22ba14b..1a6a07d0 100644 --- a/src/main/java/org/ldk/structs/RawInvoice.java +++ b/src/main/java/org/ldk/structs/RawInvoice.java @@ -28,7 +28,7 @@ public class RawInvoice extends CommonBase { */ public RawDataPart get_data() { long ret = bindings.RawInvoice_get_data(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RawDataPart ret_hu_conv = new RawDataPart(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -57,7 +57,7 @@ public class RawInvoice extends CommonBase { */ public RawInvoice clone() { long ret = bindings.RawInvoice_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RawInvoice ret_hu_conv = new RawInvoice(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -77,7 +77,7 @@ public class RawInvoice extends CommonBase { @Nullable public Sha256 payment_hash() { long ret = bindings.RawInvoice_payment_hash(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sha256 ret_hu_conv = new Sha256(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -89,7 +89,7 @@ public class RawInvoice extends CommonBase { @Nullable public Description description() { long ret = bindings.RawInvoice_description(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Description ret_hu_conv = new Description(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -101,7 +101,7 @@ public class RawInvoice extends CommonBase { @Nullable public PayeePubKey payee_pub_key() { long ret = bindings.RawInvoice_payee_pub_key(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } PayeePubKey ret_hu_conv = new PayeePubKey(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -113,7 +113,7 @@ public class RawInvoice extends CommonBase { @Nullable public Sha256 description_hash() { long ret = bindings.RawInvoice_description_hash(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sha256 ret_hu_conv = new Sha256(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -125,7 +125,7 @@ public class RawInvoice extends CommonBase { @Nullable public ExpiryTime expiry_time() { long ret = bindings.RawInvoice_expiry_time(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ExpiryTime ret_hu_conv = new ExpiryTime(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -137,7 +137,7 @@ public class RawInvoice extends CommonBase { @Nullable public MinFinalCltvExpiry min_final_cltv_expiry() { long ret = bindings.RawInvoice_min_final_cltv_expiry(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } MinFinalCltvExpiry ret_hu_conv = new MinFinalCltvExpiry(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -158,7 +158,7 @@ public class RawInvoice extends CommonBase { @Nullable public InvoiceFeatures features() { long ret = bindings.RawInvoice_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -178,7 +178,7 @@ public class RawInvoice extends CommonBase { public Option_u64Z amount_pico_btc() { long ret = bindings.RawInvoice_amount_pico_btc(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/ReplyChannelRange.java b/src/main/java/org/ldk/structs/ReplyChannelRange.java index 3dbb6723..06cc41f8 100644 --- a/src/main/java/org/ldk/structs/ReplyChannelRange.java +++ b/src/main/java/org/ldk/structs/ReplyChannelRange.java @@ -97,7 +97,7 @@ public class ReplyChannelRange extends CommonBase { */ public static ReplyChannelRange of(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg) { long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -108,7 +108,7 @@ public class ReplyChannelRange extends CommonBase { */ public ReplyChannelRange clone() { long ret = bindings.ReplyChannelRange_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -119,7 +119,7 @@ public class ReplyChannelRange extends CommonBase { */ public static Result_ReplyChannelRangeDecodeErrorZ read(byte[] ser) { long ret = bindings.ReplyChannelRange_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java b/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java index 308438c9..ade43d8d 100644 --- a/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java +++ b/src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java @@ -59,7 +59,7 @@ public class ReplyShortChannelIdsEnd extends CommonBase { */ public static ReplyShortChannelIdsEnd of(byte[] chain_hash_arg, boolean full_information_arg) { long ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -70,7 +70,7 @@ public class ReplyShortChannelIdsEnd extends CommonBase { */ public ReplyShortChannelIdsEnd clone() { long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -89,7 +89,7 @@ public class ReplyShortChannelIdsEnd extends CommonBase { */ public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) { long ret = bindings.ReplyShortChannelIdsEnd_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java index 037fad75..5d2b743e 100644 --- a/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase { */ public static Result_AcceptChannelDecodeErrorZ ok(AcceptChannel o) { long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase { */ public static Result_AcceptChannelDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_AcceptChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase { */ public Result_AcceptChannelDecodeErrorZ clone() { long ret = bindings.CResult_AcceptChannelDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java index 1f912154..66205d0a 100644 --- a/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { */ public static Result_AnnouncementSignaturesDecodeErrorZ ok(AnnouncementSignatures o) { long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { */ public static Result_AnnouncementSignaturesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase { */ public Result_AnnouncementSignaturesDecodeErrorZ clone() { long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java index 94c5dd62..7a864389 100644 --- a/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_BuiltCommitmentTransactionDecodeErrorZ ok(BuiltCommitmentTransaction o) { long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_BuiltCommitmentTransactionDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase { */ public Result_BuiltCommitmentTransactionDecodeErrorZ clone() { long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java index 51e9baea..a81e2774 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB */ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ok(TwoTuple_BlockHashChannelManagerZ o) { long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB */ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java index b7536450..85ba9b8c 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB */ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ok(TwoTuple_BlockHashChannelMonitorZ o) { long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB */ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB */ public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ clone() { long ret = bindings.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java index cd08d347..43d692b4 100644 --- a/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java @@ -41,7 +41,7 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { */ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ok(TwoTuple_SignatureCVec_SignatureZZ o) { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { */ public static Result_C2Tuple_SignatureCVec_SignatureZZNoneZ err() { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase { */ public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ clone() { long ret = bindings.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java index 094e0838..5b514a9b 100644 --- a/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase { */ public static Result_COption_TypeZDecodeErrorZ ok(Option_TypeZ o) { long ret = bindings.CResult_COption_TypeZDecodeErrorZ_ok(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase { */ public static Result_COption_TypeZDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_COption_TypeZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase { */ public Result_COption_TypeZDecodeErrorZ clone() { long ret = bindings.CResult_COption_TypeZDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_COption_TypeZDecodeErrorZ ret_hu_conv = Result_COption_TypeZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CResult_NetAddressu8ZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CResult_NetAddressu8ZDecodeErrorZ.java index 08cf4541..c88d61f7 100644 --- a/src/main/java/org/ldk/structs/Result_CResult_NetAddressu8ZDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CResult_NetAddressu8ZDecodeErrorZ.java @@ -45,7 +45,7 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase { */ public static Result_CResult_NetAddressu8ZDecodeErrorZ ok(Result_NetAddressu8Z o) { long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o != null ? o.ptr : 0); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -55,7 +55,7 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase { */ public static Result_CResult_NetAddressu8ZDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -66,7 +66,7 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ extends CommonBase { */ public Result_CResult_NetAddressu8ZDecodeErrorZ clone() { long ret = bindings.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CResult_NetAddressu8ZDecodeErrorZ ret_hu_conv = Result_CResult_NetAddressu8ZDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.java index 16f5c8ce..bfab1ceb 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.java @@ -48,7 +48,7 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB */ public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ok(TwoTuple_BlockHashChannelMonitorZ[] o) { long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_35 -> o_conv_35 != null ? o_conv_35.ptr : 0).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -58,7 +58,7 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB */ public static Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ err(org.ldk.enums.IOError e) { long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -69,7 +69,7 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ extends CommonB */ public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ clone() { long ret = bindings.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java index c027e41b..66f0e944 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java @@ -38,7 +38,7 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase { */ public static Result_CVec_CVec_u8ZZNoneZ ok(byte[][] o) { long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase { */ public static Result_CVec_CVec_u8ZZNoneZ err() { long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase { */ public Result_CVec_CVec_u8ZZNoneZ clone() { long ret = bindings.CResult_CVec_CVec_u8ZZNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CVec_SignatureZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_SignatureZNoneZ.java index 5aaba99a..5a84aee3 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_SignatureZNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_SignatureZNoneZ.java @@ -38,7 +38,7 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase { */ public static Result_CVec_SignatureZNoneZ ok(byte[][] o) { long ret = bindings.CResult_CVec_SignatureZNoneZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase { */ public static Result_CVec_SignatureZNoneZ err() { long ret = bindings.CResult_CVec_SignatureZNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_CVec_SignatureZNoneZ extends CommonBase { */ public Result_CVec_SignatureZNoneZ clone() { long ret = bindings.CResult_CVec_SignatureZNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java index 3cd4d240..fa201fcf 100644 --- a/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java @@ -43,7 +43,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { */ public static Result_CVec_u8ZPeerHandleErrorZ ok(byte[] o) { long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { */ public static Result_CVec_u8ZPeerHandleErrorZ err(PeerHandleError e) { long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { */ public Result_CVec_u8ZPeerHandleErrorZ clone() { long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java index 01f28201..bbdef01e 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_ChannelAnnouncementDecodeErrorZ ok(ChannelAnnouncement o) { long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_ChannelAnnouncementDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase { */ public Result_ChannelAnnouncementDecodeErrorZ clone() { long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java index 703423d6..c9997661 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase { */ public static Result_ChannelConfigDecodeErrorZ ok(ChannelConfig o) { long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase { */ public static Result_ChannelConfigDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelConfigDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase { */ public Result_ChannelConfigDecodeErrorZ clone() { long ret = bindings.CResult_ChannelConfigDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java index 9eb7c15e..5041048b 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase { */ public static Result_ChannelFeaturesDecodeErrorZ ok(ChannelFeatures o) { long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase { */ public static Result_ChannelFeaturesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java index e8281ef7..b88b56f0 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase { */ public static Result_ChannelInfoDecodeErrorZ ok(ChannelInfo o) { long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase { */ public static Result_ChannelInfoDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase { */ public Result_ChannelInfoDecodeErrorZ clone() { long ret = bindings.CResult_ChannelInfoDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java index 6ec1bea3..5d89780a 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { */ public static Result_ChannelMonitorUpdateDecodeErrorZ ok(ChannelMonitorUpdate o) { long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { */ public static Result_ChannelMonitorUpdateDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase { */ public Result_ChannelMonitorUpdateDecodeErrorZ clone() { long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java index 2410d010..b23524e8 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { */ public static Result_ChannelPublicKeysDecodeErrorZ ok(ChannelPublicKeys o) { long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { */ public static Result_ChannelPublicKeysDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase { */ public Result_ChannelPublicKeysDecodeErrorZ clone() { long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java index 077ecd0e..7d9633aa 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase { */ public static Result_ChannelReestablishDecodeErrorZ ok(ChannelReestablish o) { long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase { */ public static Result_ChannelReestablishDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase { */ public Result_ChannelReestablishDecodeErrorZ clone() { long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java index 57beaba6..78c72872 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase */ public static Result_ChannelTransactionParametersDecodeErrorZ ok(ChannelTransactionParameters o) { long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase */ public static Result_ChannelTransactionParametersDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase */ public Result_ChannelTransactionParametersDecodeErrorZ clone() { long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java index 8769b47f..43eec2d2 100644 --- a/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase { */ public static Result_ChannelUpdateDecodeErrorZ ok(ChannelUpdate o) { long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase { */ public static Result_ChannelUpdateDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase { */ public Result_ChannelUpdateDecodeErrorZ clone() { long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java index dec898d0..fdc1f01e 100644 --- a/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase { */ public static Result_ClosingSignedDecodeErrorZ ok(ClosingSigned o) { long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase { */ public static Result_ClosingSignedDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ClosingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase { */ public Result_ClosingSignedDecodeErrorZ clone() { long ret = bindings.CResult_ClosingSignedDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java index b17dde5a..4dd36811 100644 --- a/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { */ public static Result_ClosingSignedFeeRangeDecodeErrorZ ok(ClosingSignedFeeRange o) { long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { */ public static Result_ClosingSignedFeeRangeDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase { */ public Result_ClosingSignedFeeRangeDecodeErrorZ clone() { long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java index ba24fcce..f53fbef8 100644 --- a/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase { */ public static Result_CommitmentSignedDecodeErrorZ ok(CommitmentSigned o) { long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase { */ public static Result_CommitmentSignedDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase { */ public Result_CommitmentSignedDecodeErrorZ clone() { long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java index 9b641ff7..f3349889 100644 --- a/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_CommitmentTransactionDecodeErrorZ ok(CommitmentTransaction o) { long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_CommitmentTransactionDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase { */ public Result_CommitmentTransactionDecodeErrorZ clone() { long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java index ba2c3264..54be3091 100644 --- a/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends */ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ ok(CounterpartyChannelTransactionParameters o) { long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends */ public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends */ public Result_CounterpartyChannelTransactionParametersDecodeErrorZ clone() { long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java index ad753cc6..01966966 100644 --- a/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas */ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ ok(DelayedPaymentOutputDescriptor o) { long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas */ public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas */ public Result_DelayedPaymentOutputDescriptorDecodeErrorZ clone() { long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java index e75142bb..d5e60bc2 100644 --- a/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java @@ -43,7 +43,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase { */ public static Result_DescriptionCreationErrorZ ok(Description o) { long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase { */ public static Result_DescriptionCreationErrorZ err(org.ldk.enums.CreationError e) { long ret = bindings.CResult_DescriptionCreationErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase { */ public Result_DescriptionCreationErrorZ clone() { long ret = bindings.CResult_DescriptionCreationErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java index 3900b150..27b026bf 100644 --- a/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase { */ public static Result_DirectionalChannelInfoDecodeErrorZ ok(DirectionalChannelInfo o) { long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase { */ public static Result_DirectionalChannelInfoDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase { */ public Result_DirectionalChannelInfoDecodeErrorZ clone() { long ret = bindings.CResult_DirectionalChannelInfoDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java index b87dfc86..31f44f25 100644 --- a/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase { */ public static Result_ErrorMessageDecodeErrorZ ok(ErrorMessage o) { long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase { */ public static Result_ErrorMessageDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ErrorMessageDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase { */ public Result_ErrorMessageDecodeErrorZ clone() { long ret = bindings.CResult_ErrorMessageDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ExpiryTimeCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_ExpiryTimeCreationErrorZ.java index f8b4ac49..2b274855 100644 --- a/src/main/java/org/ldk/structs/Result_ExpiryTimeCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ExpiryTimeCreationErrorZ.java @@ -43,7 +43,7 @@ public class Result_ExpiryTimeCreationErrorZ extends CommonBase { */ public static Result_ExpiryTimeCreationErrorZ ok(ExpiryTime o) { long ret = bindings.CResult_ExpiryTimeCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_ExpiryTimeCreationErrorZ extends CommonBase { */ public static Result_ExpiryTimeCreationErrorZ err(org.ldk.enums.CreationError e) { long ret = bindings.CResult_ExpiryTimeCreationErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_ExpiryTimeCreationErrorZ extends CommonBase { */ public Result_ExpiryTimeCreationErrorZ clone() { long ret = bindings.CResult_ExpiryTimeCreationErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ExpiryTimeCreationErrorZ ret_hu_conv = Result_ExpiryTimeCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java index bd1938a2..f74933c0 100644 --- a/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase { */ public static Result_FundingCreatedDecodeErrorZ ok(FundingCreated o) { long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase { */ public static Result_FundingCreatedDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_FundingCreatedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase { */ public Result_FundingCreatedDecodeErrorZ clone() { long ret = bindings.CResult_FundingCreatedDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java index 386c0d73..4fe75539 100644 --- a/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase { */ public static Result_FundingLockedDecodeErrorZ ok(FundingLocked o) { long ret = bindings.CResult_FundingLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase { */ public static Result_FundingLockedDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_FundingLockedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_FundingLockedDecodeErrorZ extends CommonBase { */ public Result_FundingLockedDecodeErrorZ clone() { long ret = bindings.CResult_FundingLockedDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java index aa7bf852..39fbb1db 100644 --- a/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase { */ public static Result_FundingSignedDecodeErrorZ ok(FundingSigned o) { long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase { */ public static Result_FundingSignedDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_FundingSignedDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase { */ public Result_FundingSignedDecodeErrorZ clone() { long ret = bindings.CResult_FundingSignedDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java index db84b80c..73899231 100644 --- a/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { */ public static Result_GossipTimestampFilterDecodeErrorZ ok(GossipTimestampFilter o) { long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { */ public static Result_GossipTimestampFilterDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase { */ public Result_GossipTimestampFilterDecodeErrorZ clone() { long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java index 7e4b2055..5e913b5d 100644 --- a/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { */ public static Result_HTLCOutputInCommitmentDecodeErrorZ ok(HTLCOutputInCommitment o) { long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { */ public static Result_HTLCOutputInCommitmentDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase { */ public Result_HTLCOutputInCommitmentDecodeErrorZ clone() { long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java index f39221c3..d0c98eb7 100644 --- a/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase { */ public static Result_HTLCUpdateDecodeErrorZ ok(HTLCUpdate o) { long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase { */ public static Result_HTLCUpdateDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase { */ public Result_HTLCUpdateDecodeErrorZ clone() { long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java index 500b1a06..b0bb4e28 100644 --- a/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_HolderCommitmentTransactionDecodeErrorZ ok(HolderCommitmentTransaction o) { long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { */ public static Result_HolderCommitmentTransactionDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase { */ public Result_HolderCommitmentTransactionDecodeErrorZ clone() { long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java index 74fade65..3ac925da 100644 --- a/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase { */ public static Result_InMemorySignerDecodeErrorZ ok(InMemorySigner o) { long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase { */ public static Result_InMemorySignerDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_InMemorySignerDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase { */ public Result_InMemorySignerDecodeErrorZ clone() { long ret = bindings.CResult_InMemorySignerDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java index 8c6a35cb..6ad9c678 100644 --- a/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_InitDecodeErrorZ extends CommonBase { */ public static Result_InitDecodeErrorZ ok(Init o) { long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_InitDecodeErrorZ extends CommonBase { */ public static Result_InitDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_InitDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_InitDecodeErrorZ extends CommonBase { */ public Result_InitDecodeErrorZ clone() { long ret = bindings.CResult_InitDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java index bcf7a4ff..e8c720c6 100644 --- a/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase { */ public static Result_InitFeaturesDecodeErrorZ ok(InitFeatures o) { long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase { */ public static Result_InitFeaturesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_InitFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java index b9dc9e78..2de17bc3 100644 --- a/src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InvoiceFeaturesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase { */ public static Result_InvoiceFeaturesDecodeErrorZ ok(InvoiceFeatures o) { long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_InvoiceFeaturesDecodeErrorZ extends CommonBase { */ public static Result_InvoiceFeaturesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_InvoiceFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InvoiceNoneZ.java b/src/main/java/org/ldk/structs/Result_InvoiceNoneZ.java index 5d841d33..9b4719bf 100644 --- a/src/main/java/org/ldk/structs/Result_InvoiceNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_InvoiceNoneZ.java @@ -41,7 +41,7 @@ public class Result_InvoiceNoneZ extends CommonBase { */ public static Result_InvoiceNoneZ ok(Invoice o) { long ret = bindings.CResult_InvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_InvoiceNoneZ extends CommonBase { */ public static Result_InvoiceNoneZ err() { long ret = bindings.CResult_InvoiceNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_InvoiceNoneZ extends CommonBase { */ public Result_InvoiceNoneZ clone() { long ret = bindings.CResult_InvoiceNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceNoneZ ret_hu_conv = Result_InvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InvoiceSemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceSemanticErrorZ.java index a564df92..8ab26beb 100644 --- a/src/main/java/org/ldk/structs/Result_InvoiceSemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InvoiceSemanticErrorZ.java @@ -43,7 +43,7 @@ public class Result_InvoiceSemanticErrorZ extends CommonBase { */ public static Result_InvoiceSemanticErrorZ ok(Invoice o) { long ret = bindings.CResult_InvoiceSemanticErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_InvoiceSemanticErrorZ extends CommonBase { */ public static Result_InvoiceSemanticErrorZ err(org.ldk.enums.SemanticError e) { long ret = bindings.CResult_InvoiceSemanticErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_InvoiceSemanticErrorZ extends CommonBase { */ public Result_InvoiceSemanticErrorZ clone() { long ret = bindings.CResult_InvoiceSemanticErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_InvoiceSignOrCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceSignOrCreationErrorZ.java index 8fd9c393..0956c297 100644 --- a/src/main/java/org/ldk/structs/Result_InvoiceSignOrCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_InvoiceSignOrCreationErrorZ.java @@ -46,7 +46,7 @@ public class Result_InvoiceSignOrCreationErrorZ extends CommonBase { */ public static Result_InvoiceSignOrCreationErrorZ ok(Invoice o) { long ret = bindings.CResult_InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_InvoiceSignOrCreationErrorZ extends CommonBase { */ public static Result_InvoiceSignOrCreationErrorZ err(SignOrCreationError e) { long ret = bindings.CResult_InvoiceSignOrCreationErrorZ_err(e.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_InvoiceSignOrCreationErrorZ extends CommonBase { */ public Result_InvoiceSignOrCreationErrorZ clone() { long ret = bindings.CResult_InvoiceSignOrCreationErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NetAddressDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NetAddressDecodeErrorZ.java index 7af576bd..6515e37e 100644 --- a/src/main/java/org/ldk/structs/Result_NetAddressDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NetAddressDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase { */ public static Result_NetAddressDecodeErrorZ ok(NetAddress o) { long ret = bindings.CResult_NetAddressDecodeErrorZ_ok(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase { */ public static Result_NetAddressDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NetAddressDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_NetAddressDecodeErrorZ extends CommonBase { */ public Result_NetAddressDecodeErrorZ clone() { long ret = bindings.CResult_NetAddressDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NetAddressu8Z.java b/src/main/java/org/ldk/structs/Result_NetAddressu8Z.java index 0cadc853..7ea9ff74 100644 --- a/src/main/java/org/ldk/structs/Result_NetAddressu8Z.java +++ b/src/main/java/org/ldk/structs/Result_NetAddressu8Z.java @@ -43,7 +43,7 @@ public class Result_NetAddressu8Z extends CommonBase { */ public static Result_NetAddressu8Z ok(NetAddress o) { long ret = bindings.CResult_NetAddressu8Z_ok(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_NetAddressu8Z extends CommonBase { */ public static Result_NetAddressu8Z err(byte e) { long ret = bindings.CResult_NetAddressu8Z_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_NetAddressu8Z extends CommonBase { */ public Result_NetAddressu8Z clone() { long ret = bindings.CResult_NetAddressu8Z_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetAddressu8Z ret_hu_conv = Result_NetAddressu8Z.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java index 5d338e21..8f97bcca 100644 --- a/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase { */ public static Result_NetworkGraphDecodeErrorZ ok(NetworkGraph o) { long ret = bindings.CResult_NetworkGraphDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase { */ public static Result_NetworkGraphDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NetworkGraphDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase { */ public Result_NetworkGraphDecodeErrorZ clone() { long ret = bindings.CResult_NetworkGraphDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NetworkGraphDecodeErrorZ ret_hu_conv = Result_NetworkGraphDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java index 737f3feb..46037d92 100644 --- a/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_NodeAnnouncementDecodeErrorZ ok(NodeAnnouncement o) { long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_NodeAnnouncementDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase { */ public Result_NodeAnnouncementDecodeErrorZ clone() { long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java index c8c12e1e..17cb824b 100644 --- a/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { */ public static Result_NodeAnnouncementInfoDecodeErrorZ ok(NodeAnnouncementInfo o) { long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { */ public static Result_NodeAnnouncementInfoDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase { */ public Result_NodeAnnouncementInfoDecodeErrorZ clone() { long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java index a4463a84..40353dac 100644 --- a/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase { */ public static Result_NodeFeaturesDecodeErrorZ ok(NodeFeatures o) { long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase { */ public static Result_NodeFeaturesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java index 19f5a7cd..b83c1d9d 100644 --- a/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase { */ public static Result_NodeInfoDecodeErrorZ ok(NodeInfo o) { long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase { */ public static Result_NodeInfoDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_NodeInfoDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase { */ public Result_NodeInfoDecodeErrorZ clone() { long ret = bindings.CResult_NodeInfoDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java index 38f33576..d78d510e 100644 --- a/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java @@ -41,7 +41,7 @@ public class Result_NoneAPIErrorZ extends CommonBase { */ public static Result_NoneAPIErrorZ ok() { long ret = bindings.CResult_NoneAPIErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_NoneAPIErrorZ extends CommonBase { */ public static Result_NoneAPIErrorZ err(APIError e) { long ret = bindings.CResult_NoneAPIErrorZ_err(e.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_NoneAPIErrorZ extends CommonBase { */ public Result_NoneAPIErrorZ clone() { long ret = bindings.CResult_NoneAPIErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java b/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java index 579a8418..753b1b42 100644 --- a/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java @@ -38,7 +38,7 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { */ public static Result_NoneChannelMonitorUpdateErrZ ok() { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { */ public static Result_NoneChannelMonitorUpdateErrZ err(org.ldk.enums.ChannelMonitorUpdateErr e) { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ clone() { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneErrorZ.java index df8293e1..158ece2f 100644 --- a/src/main/java/org/ldk/structs/Result_NoneErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneErrorZ.java @@ -38,7 +38,7 @@ public class Result_NoneErrorZ extends CommonBase { */ public static Result_NoneErrorZ ok() { long ret = bindings.CResult_NoneErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_NoneErrorZ extends CommonBase { */ public static Result_NoneErrorZ err(org.ldk.enums.IOError e) { long ret = bindings.CResult_NoneErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_NoneErrorZ extends CommonBase { */ public Result_NoneErrorZ clone() { long ret = bindings.CResult_NoneErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java index 225e22ea..ca409756 100644 --- a/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java @@ -41,7 +41,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { */ public static Result_NoneLightningErrorZ ok() { long ret = bindings.CResult_NoneLightningErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { */ public static Result_NoneLightningErrorZ err(LightningError e) { long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_NoneLightningErrorZ extends CommonBase { */ public Result_NoneLightningErrorZ clone() { long ret = bindings.CResult_NoneLightningErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneMonitorUpdateErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneMonitorUpdateErrorZ.java index a8b684ac..63105160 100644 --- a/src/main/java/org/ldk/structs/Result_NoneMonitorUpdateErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneMonitorUpdateErrorZ.java @@ -41,7 +41,7 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase { */ public static Result_NoneMonitorUpdateErrorZ ok() { long ret = bindings.CResult_NoneMonitorUpdateErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase { */ public static Result_NoneMonitorUpdateErrorZ err(MonitorUpdateError e) { long ret = bindings.CResult_NoneMonitorUpdateErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_NoneMonitorUpdateErrorZ extends CommonBase { */ public Result_NoneMonitorUpdateErrorZ clone() { long ret = bindings.CResult_NoneMonitorUpdateErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneMonitorUpdateErrorZ ret_hu_conv = Result_NoneMonitorUpdateErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneNoneZ.java b/src/main/java/org/ldk/structs/Result_NoneNoneZ.java index d1f1e14f..ac7db700 100644 --- a/src/main/java/org/ldk/structs/Result_NoneNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneNoneZ.java @@ -36,7 +36,7 @@ public class Result_NoneNoneZ extends CommonBase { */ public static Result_NoneNoneZ ok() { long ret = bindings.CResult_NoneNoneZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -46,7 +46,7 @@ public class Result_NoneNoneZ extends CommonBase { */ public static Result_NoneNoneZ err() { long ret = bindings.CResult_NoneNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -57,7 +57,7 @@ public class Result_NoneNoneZ extends CommonBase { */ public Result_NoneNoneZ clone() { long ret = bindings.CResult_NoneNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java b/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java index 40ce3166..bb736ac0 100644 --- a/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java @@ -41,7 +41,7 @@ public class Result_NonePaymentSendFailureZ extends CommonBase { */ public static Result_NonePaymentSendFailureZ ok() { long ret = bindings.CResult_NonePaymentSendFailureZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_NonePaymentSendFailureZ extends CommonBase { */ public static Result_NonePaymentSendFailureZ err(PaymentSendFailure e) { long ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_NonePaymentSendFailureZ extends CommonBase { */ public Result_NonePaymentSendFailureZ clone() { long ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java index 2e8dd66f..010c67a4 100644 --- a/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java @@ -41,7 +41,7 @@ public class Result_NonePeerHandleErrorZ extends CommonBase { */ public static Result_NonePeerHandleErrorZ ok() { long ret = bindings.CResult_NonePeerHandleErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_NonePeerHandleErrorZ extends CommonBase { */ public static Result_NonePeerHandleErrorZ err(PeerHandleError e) { long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_NonePeerHandleErrorZ extends CommonBase { */ public Result_NonePeerHandleErrorZ clone() { long ret = bindings.CResult_NonePeerHandleErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_NoneSemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_NoneSemanticErrorZ.java index eaa13eb5..85a9ae7a 100644 --- a/src/main/java/org/ldk/structs/Result_NoneSemanticErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneSemanticErrorZ.java @@ -38,7 +38,7 @@ public class Result_NoneSemanticErrorZ extends CommonBase { */ public static Result_NoneSemanticErrorZ ok() { long ret = bindings.CResult_NoneSemanticErrorZ_ok(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_NoneSemanticErrorZ extends CommonBase { */ public static Result_NoneSemanticErrorZ err(org.ldk.enums.SemanticError e) { long ret = bindings.CResult_NoneSemanticErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_NoneSemanticErrorZ extends CommonBase { */ public Result_NoneSemanticErrorZ clone() { long ret = bindings.CResult_NoneSemanticErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java index ffcc1791..9c2df679 100644 --- a/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase { */ public static Result_OpenChannelDecodeErrorZ ok(OpenChannel o) { long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase { */ public static Result_OpenChannelDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_OpenChannelDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase { */ public Result_OpenChannelDecodeErrorZ clone() { long ret = bindings.CResult_OpenChannelDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java index 4e9930ce..39abca09 100644 --- a/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase { */ public static Result_OutPointDecodeErrorZ ok(OutPoint o) { long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase { */ public static Result_OutPointDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_OutPointDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase { */ public Result_OutPointDecodeErrorZ clone() { long ret = bindings.CResult_OutPointDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PayeePubKeyErrorZ.java b/src/main/java/org/ldk/structs/Result_PayeePubKeyErrorZ.java index 7ac3130e..8cb71a55 100644 --- a/src/main/java/org/ldk/structs/Result_PayeePubKeyErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PayeePubKeyErrorZ.java @@ -43,7 +43,7 @@ public class Result_PayeePubKeyErrorZ extends CommonBase { */ public static Result_PayeePubKeyErrorZ ok(PayeePubKey o) { long ret = bindings.CResult_PayeePubKeyErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_PayeePubKeyErrorZ extends CommonBase { */ public static Result_PayeePubKeyErrorZ err(org.ldk.enums.Secp256k1Error e) { long ret = bindings.CResult_PayeePubKeyErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_PayeePubKeyErrorZ extends CommonBase { */ public Result_PayeePubKeyErrorZ clone() { long ret = bindings.CResult_PayeePubKeyErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PaymentHashPaymentSendFailureZ.java b/src/main/java/org/ldk/structs/Result_PaymentHashPaymentSendFailureZ.java index 2edcb328..ef6af9d4 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentHashPaymentSendFailureZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentHashPaymentSendFailureZ.java @@ -43,7 +43,7 @@ public class Result_PaymentHashPaymentSendFailureZ extends CommonBase { */ public static Result_PaymentHashPaymentSendFailureZ ok(byte[] o) { long ret = bindings.CResult_PaymentHashPaymentSendFailureZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_PaymentHashPaymentSendFailureZ extends CommonBase { */ public static Result_PaymentHashPaymentSendFailureZ err(PaymentSendFailure e) { long ret = bindings.CResult_PaymentHashPaymentSendFailureZ_err(e.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_PaymentHashPaymentSendFailureZ extends CommonBase { */ public Result_PaymentHashPaymentSendFailureZ clone() { long ret = bindings.CResult_PaymentHashPaymentSendFailureZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentHashPaymentSendFailureZ ret_hu_conv = Result_PaymentHashPaymentSendFailureZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PaymentSecretAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentSecretAPIErrorZ.java index 841755f9..a05fac00 100644 --- a/src/main/java/org/ldk/structs/Result_PaymentSecretAPIErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PaymentSecretAPIErrorZ.java @@ -43,7 +43,7 @@ public class Result_PaymentSecretAPIErrorZ extends CommonBase { */ public static Result_PaymentSecretAPIErrorZ ok(byte[] o) { long ret = bindings.CResult_PaymentSecretAPIErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_PaymentSecretAPIErrorZ extends CommonBase { */ public static Result_PaymentSecretAPIErrorZ err(APIError e) { long ret = bindings.CResult_PaymentSecretAPIErrorZ_err(e.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_PaymentSecretAPIErrorZ extends CommonBase { */ public Result_PaymentSecretAPIErrorZ clone() { long ret = bindings.CResult_PaymentSecretAPIErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PaymentSecretAPIErrorZ ret_hu_conv = Result_PaymentSecretAPIErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java index 8c5d11ca..871f4023 100644 --- a/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_PingDecodeErrorZ extends CommonBase { */ public static Result_PingDecodeErrorZ ok(Ping o) { long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_PingDecodeErrorZ extends CommonBase { */ public static Result_PingDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_PingDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_PingDecodeErrorZ extends CommonBase { */ public Result_PingDecodeErrorZ clone() { long ret = bindings.CResult_PingDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java index 5a533b45..1a356c2f 100644 --- a/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_PongDecodeErrorZ extends CommonBase { */ public static Result_PongDecodeErrorZ ok(Pong o) { long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_PongDecodeErrorZ extends CommonBase { */ public static Result_PongDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_PongDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_PongDecodeErrorZ extends CommonBase { */ public Result_PongDecodeErrorZ clone() { long ret = bindings.CResult_PongDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java index 425ebbed..33f5cedd 100644 --- a/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java @@ -43,7 +43,7 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase { */ public static Result_PositiveTimestampCreationErrorZ ok(PositiveTimestamp o) { long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase { */ public static Result_PositiveTimestampCreationErrorZ err(org.ldk.enums.CreationError e) { long ret = bindings.CResult_PositiveTimestampCreationErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase { */ public Result_PositiveTimestampCreationErrorZ clone() { long ret = bindings.CResult_PositiveTimestampCreationErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java b/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java index fcc84afb..6fc8d26f 100644 --- a/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java @@ -43,7 +43,7 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase { */ public static Result_PrivateRouteCreationErrorZ ok(PrivateRoute o) { long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase { */ public static Result_PrivateRouteCreationErrorZ err(org.ldk.enums.CreationError e) { long ret = bindings.CResult_PrivateRouteCreationErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase { */ public Result_PrivateRouteCreationErrorZ clone() { long ret = bindings.CResult_PrivateRouteCreationErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java b/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java index da9c9af6..932d55ae 100644 --- a/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java @@ -40,7 +40,7 @@ public class Result_PublicKeyErrorZ extends CommonBase { */ public static Result_PublicKeyErrorZ ok(byte[] o) { long ret = bindings.CResult_PublicKeyErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -50,7 +50,7 @@ public class Result_PublicKeyErrorZ extends CommonBase { */ public static Result_PublicKeyErrorZ err(org.ldk.enums.Secp256k1Error e) { long ret = bindings.CResult_PublicKeyErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -61,7 +61,7 @@ public class Result_PublicKeyErrorZ extends CommonBase { */ public Result_PublicKeyErrorZ clone() { long ret = bindings.CResult_PublicKeyErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java index 3e3b469a..15fb47f7 100644 --- a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { */ public static Result_QueryChannelRangeDecodeErrorZ ok(QueryChannelRange o) { long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { */ public static Result_QueryChannelRangeDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { */ public Result_QueryChannelRangeDecodeErrorZ clone() { long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java index 60648b39..d05caf58 100644 --- a/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { */ public static Result_QueryShortChannelIdsDecodeErrorZ ok(QueryShortChannelIds o) { long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { */ public static Result_QueryShortChannelIdsDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase { */ public Result_QueryShortChannelIdsDecodeErrorZ clone() { long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java b/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java index c9dc2026..2f2f54e2 100644 --- a/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java @@ -38,7 +38,7 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase { */ public static Result_RecoverableSignatureNoneZ ok(byte[] arg) { long ret = bindings.CResult_RecoverableSignatureNoneZ_ok(arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase { */ public static Result_RecoverableSignatureNoneZ err() { long ret = bindings.CResult_RecoverableSignatureNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase { */ public Result_RecoverableSignatureNoneZ clone() { long ret = bindings.CResult_RecoverableSignatureNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java index 3a05b8b1..8a49998d 100644 --- a/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { */ public static Result_ReplyChannelRangeDecodeErrorZ ok(ReplyChannelRange o) { long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { */ public static Result_ReplyChannelRangeDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase { */ public Result_ReplyChannelRangeDecodeErrorZ clone() { long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java index a1f2d0f8..4038ac89 100644 --- a/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { */ public static Result_ReplyShortChannelIdsEndDecodeErrorZ ok(ReplyShortChannelIdsEnd o) { long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { */ public static Result_ReplyShortChannelIdsEndDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase { */ public Result_ReplyShortChannelIdsEndDecodeErrorZ clone() { long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java index c29567b0..8a979c3e 100644 --- a/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase { */ public static Result_RevokeAndACKDecodeErrorZ ok(RevokeAndACK o) { long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase { */ public static Result_RevokeAndACKDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase { */ public Result_RevokeAndACKDecodeErrorZ clone() { long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java index fa60cda5..8da8f353 100644 --- a/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase { */ public static Result_RouteDecodeErrorZ ok(Route o) { long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase { */ public static Result_RouteDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_RouteDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase { */ public Result_RouteDecodeErrorZ clone() { long ret = bindings.CResult_RouteDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java index 331ecadd..45e1bde7 100644 --- a/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase { */ public static Result_RouteHopDecodeErrorZ ok(RouteHop o) { long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase { */ public static Result_RouteHopDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_RouteHopDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase { */ public Result_RouteHopDecodeErrorZ clone() { long ret = bindings.CResult_RouteHopDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java index 916e9bfa..b14b5d9e 100644 --- a/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java @@ -46,7 +46,7 @@ public class Result_RouteLightningErrorZ extends CommonBase { */ public static Result_RouteLightningErrorZ ok(Route o) { long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_RouteLightningErrorZ extends CommonBase { */ public static Result_RouteLightningErrorZ err(LightningError e) { long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_RouteLightningErrorZ extends CommonBase { */ public Result_RouteLightningErrorZ clone() { long ret = bindings.CResult_RouteLightningErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java index c0cd7d1d..c6139115 100644 --- a/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase { */ public static Result_RoutingFeesDecodeErrorZ ok(RoutingFees o) { long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase { */ public static Result_RoutingFeesDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_RoutingFeesDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase { */ public Result_RoutingFeesDecodeErrorZ clone() { long ret = bindings.CResult_RoutingFeesDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java b/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java index 74102103..2e1bbd1f 100644 --- a/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java @@ -40,7 +40,7 @@ public class Result_SecretKeyErrorZ extends CommonBase { */ public static Result_SecretKeyErrorZ ok(byte[] o) { long ret = bindings.CResult_SecretKeyErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -50,7 +50,7 @@ public class Result_SecretKeyErrorZ extends CommonBase { */ public static Result_SecretKeyErrorZ err(org.ldk.enums.Secp256k1Error e) { long ret = bindings.CResult_SecretKeyErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java index 2a7a167e..9c6f3274 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase { */ public static Result_ShutdownDecodeErrorZ ok(Shutdown o) { long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase { */ public static Result_ShutdownDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ShutdownDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase { */ public Result_ShutdownDecodeErrorZ clone() { long ret = bindings.CResult_ShutdownDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java index 923b0677..530fb84f 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase { */ public static Result_ShutdownScriptDecodeErrorZ ok(ShutdownScript o) { long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase { */ public static Result_ShutdownScriptDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase { */ public Result_ShutdownScriptDecodeErrorZ clone() { long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java b/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java index f456455d..3d516e83 100644 --- a/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java +++ b/src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java @@ -46,7 +46,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { */ public static Result_ShutdownScriptInvalidShutdownScriptZ ok(ShutdownScript o) { long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase { */ public static Result_ShutdownScriptInvalidShutdownScriptZ err(byte[] e_script_arg) { long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(bindings.InvalidShutdownScript_new(e_script_arg)); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SiPrefixNoneZ.java b/src/main/java/org/ldk/structs/Result_SiPrefixNoneZ.java index 1561bb24..a6717bd9 100644 --- a/src/main/java/org/ldk/structs/Result_SiPrefixNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_SiPrefixNoneZ.java @@ -38,7 +38,7 @@ public class Result_SiPrefixNoneZ extends CommonBase { */ public static Result_SiPrefixNoneZ ok(org.ldk.enums.SiPrefix o) { long ret = bindings.CResult_SiPrefixNoneZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_SiPrefixNoneZ extends CommonBase { */ public static Result_SiPrefixNoneZ err() { long ret = bindings.CResult_SiPrefixNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_SiPrefixNoneZ extends CommonBase { */ public Result_SiPrefixNoneZ clone() { long ret = bindings.CResult_SiPrefixNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SiPrefixNoneZ ret_hu_conv = Result_SiPrefixNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java index 43e02854..1ab2618e 100644 --- a/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_SignDecodeErrorZ extends CommonBase { */ public static Result_SignDecodeErrorZ ok(Sign o) { long ret = bindings.CResult_SignDecodeErrorZ_ok(o == null ? 0 : o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(o); return ret_hu_conv; @@ -57,7 +57,7 @@ public class Result_SignDecodeErrorZ extends CommonBase { */ public static Result_SignDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_SignDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -68,7 +68,7 @@ public class Result_SignDecodeErrorZ extends CommonBase { */ public Result_SignDecodeErrorZ clone() { long ret = bindings.CResult_SignDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SignatureNoneZ.java b/src/main/java/org/ldk/structs/Result_SignatureNoneZ.java index b008a811..5ab9f465 100644 --- a/src/main/java/org/ldk/structs/Result_SignatureNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_SignatureNoneZ.java @@ -38,7 +38,7 @@ public class Result_SignatureNoneZ extends CommonBase { */ public static Result_SignatureNoneZ ok(byte[] o) { long ret = bindings.CResult_SignatureNoneZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_SignatureNoneZ extends CommonBase { */ public static Result_SignatureNoneZ err() { long ret = bindings.CResult_SignatureNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_SignatureNoneZ extends CommonBase { */ public Result_SignatureNoneZ clone() { long ret = bindings.CResult_SignatureNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SignedRawInvoiceNoneZ.java b/src/main/java/org/ldk/structs/Result_SignedRawInvoiceNoneZ.java index 0e936f8c..b1b29e5d 100644 --- a/src/main/java/org/ldk/structs/Result_SignedRawInvoiceNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_SignedRawInvoiceNoneZ.java @@ -41,7 +41,7 @@ public class Result_SignedRawInvoiceNoneZ extends CommonBase { */ public static Result_SignedRawInvoiceNoneZ ok(SignedRawInvoice o) { long ret = bindings.CResult_SignedRawInvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -51,7 +51,7 @@ public class Result_SignedRawInvoiceNoneZ extends CommonBase { */ public static Result_SignedRawInvoiceNoneZ err() { long ret = bindings.CResult_SignedRawInvoiceNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -62,7 +62,7 @@ public class Result_SignedRawInvoiceNoneZ extends CommonBase { */ public Result_SignedRawInvoiceNoneZ clone() { long ret = bindings.CResult_SignedRawInvoiceNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java index 4c5a0c0a..36d2291e 100644 --- a/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase { */ public static Result_SpendableOutputDescriptorDecodeErrorZ ok(SpendableOutputDescriptor o) { long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase { */ public static Result_SpendableOutputDescriptorDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase { */ public Result_SpendableOutputDescriptorDecodeErrorZ clone() { long ret = bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java index e6e324be..18de8c63 100644 --- a/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase */ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ ok(StaticPaymentOutputDescriptor o) { long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase */ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase */ public Result_StaticPaymentOutputDescriptorDecodeErrorZ clone() { long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_StringErrorZ.java b/src/main/java/org/ldk/structs/Result_StringErrorZ.java index adefd2f7..9439ef68 100644 --- a/src/main/java/org/ldk/structs/Result_StringErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_StringErrorZ.java @@ -40,7 +40,7 @@ public class Result_StringErrorZ extends CommonBase { */ public static Result_StringErrorZ ok(java.lang.String o) { long ret = bindings.CResult_StringErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -50,7 +50,7 @@ public class Result_StringErrorZ extends CommonBase { */ public static Result_StringErrorZ err(org.ldk.enums.Secp256k1Error e) { long ret = bindings.CResult_StringErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java index 0f6f8e83..2466358a 100644 --- a/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java @@ -38,7 +38,7 @@ public class Result_TransactionNoneZ extends CommonBase { */ public static Result_TransactionNoneZ ok(byte[] o) { long ret = bindings.CResult_TransactionNoneZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -48,7 +48,7 @@ public class Result_TransactionNoneZ extends CommonBase { */ public static Result_TransactionNoneZ err() { long ret = bindings.CResult_TransactionNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -59,7 +59,7 @@ public class Result_TransactionNoneZ extends CommonBase { */ public Result_TransactionNoneZ clone() { long ret = bindings.CResult_TransactionNoneZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java index 08c6b9bb..fd3977c8 100644 --- a/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java @@ -41,7 +41,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase { */ public static Result_TrustedClosingTransactionNoneZ ok(TrustedClosingTransaction o) { long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(o); // Due to rust's strict-ownership memory model, in some cases we need to "move" @@ -60,7 +60,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase { */ public static Result_TrustedClosingTransactionNoneZ err() { long ret = bindings.CResult_TrustedClosingTransactionNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java index 68be3d9e..1051dd7d 100644 --- a/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java +++ b/src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java @@ -41,7 +41,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase { */ public static Result_TrustedCommitmentTransactionNoneZ ok(TrustedCommitmentTransaction o) { long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(o); // Due to rust's strict-ownership memory model, in some cases we need to "move" @@ -60,7 +60,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase { */ public static Result_TrustedCommitmentTransactionNoneZ err() { long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_err(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java index 95885e33..cf6d3ee7 100644 --- a/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase { */ public static Result_TxCreationKeysDecodeErrorZ ok(TxCreationKeys o) { long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase { */ public static Result_TxCreationKeysDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase { */ public Result_TxCreationKeysDecodeErrorZ clone() { long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java index 592be8be..8c95e565 100644 --- a/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java @@ -43,7 +43,7 @@ public class Result_TxCreationKeysErrorZ extends CommonBase { */ public static Result_TxCreationKeysErrorZ ok(TxCreationKeys o) { long ret = bindings.CResult_TxCreationKeysErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_TxCreationKeysErrorZ extends CommonBase { */ public static Result_TxCreationKeysErrorZ err(org.ldk.enums.Secp256k1Error e) { long ret = bindings.CResult_TxCreationKeysErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_TxCreationKeysErrorZ extends CommonBase { */ public Result_TxCreationKeysErrorZ clone() { long ret = bindings.CResult_TxCreationKeysErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_TxOutAccessErrorZ.java b/src/main/java/org/ldk/structs/Result_TxOutAccessErrorZ.java index bf1ad200..21e2ca1e 100644 --- a/src/main/java/org/ldk/structs/Result_TxOutAccessErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_TxOutAccessErrorZ.java @@ -42,7 +42,7 @@ public class Result_TxOutAccessErrorZ extends CommonBase { */ public static Result_TxOutAccessErrorZ ok(TxOut o) { long ret = bindings.CResult_TxOutAccessErrorZ_ok(o.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -52,7 +52,7 @@ public class Result_TxOutAccessErrorZ extends CommonBase { */ public static Result_TxOutAccessErrorZ err(org.ldk.enums.AccessError e) { long ret = bindings.CResult_TxOutAccessErrorZ_err(e); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -63,7 +63,7 @@ public class Result_TxOutAccessErrorZ extends CommonBase { */ public Result_TxOutAccessErrorZ clone() { long ret = bindings.CResult_TxOutAccessErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxOutAccessErrorZ ret_hu_conv = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java index b656add7..d442f6fb 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_UnsignedChannelAnnouncementDecodeErrorZ ok(UnsignedChannelAnnouncement o) { long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_UnsignedChannelAnnouncementDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase { */ public Result_UnsignedChannelAnnouncementDecodeErrorZ clone() { long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java index 2a64ca92..21d96fa8 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { */ public static Result_UnsignedChannelUpdateDecodeErrorZ ok(UnsignedChannelUpdate o) { long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { */ public static Result_UnsignedChannelUpdateDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase { */ public Result_UnsignedChannelUpdateDecodeErrorZ clone() { long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java index aee70167..d52944e7 100644 --- a/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_UnsignedNodeAnnouncementDecodeErrorZ ok(UnsignedNodeAnnouncement o) { long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { */ public static Result_UnsignedNodeAnnouncementDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase { */ public Result_UnsignedNodeAnnouncementDecodeErrorZ clone() { long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java index 92129ee8..74a25abf 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateAddHTLCDecodeErrorZ ok(UpdateAddHTLC o) { long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateAddHTLCDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase { */ public Result_UpdateAddHTLCDecodeErrorZ clone() { long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java index d387c7c9..d0c051cd 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFailHTLCDecodeErrorZ ok(UpdateFailHTLC o) { long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFailHTLCDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase { */ public Result_UpdateFailHTLCDecodeErrorZ clone() { long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java index 58d27ecf..07661e23 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFailMalformedHTLCDecodeErrorZ ok(UpdateFailMalformedHTLC o) { long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFailMalformedHTLCDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase { */ public Result_UpdateFailMalformedHTLCDecodeErrorZ clone() { long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java index b32fc569..91bbbb48 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase { */ public static Result_UpdateFeeDecodeErrorZ ok(UpdateFee o) { long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase { */ public static Result_UpdateFeeDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UpdateFeeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase { */ public Result_UpdateFeeDecodeErrorZ clone() { long ret = bindings.CResult_UpdateFeeDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java index 48987a94..31f2cb93 100644 --- a/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java @@ -46,7 +46,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFulfillHTLCDecodeErrorZ ok(UpdateFulfillHTLC o) { long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -56,7 +56,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { */ public static Result_UpdateFulfillHTLCDecodeErrorZ err(DecodeError e) { long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -67,7 +67,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase { */ public Result_UpdateFulfillHTLCDecodeErrorZ clone() { long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java b/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java index 2258d367..9d7a3595 100644 --- a/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java @@ -43,7 +43,7 @@ public class Result_boolLightningErrorZ extends CommonBase { */ public static Result_boolLightningErrorZ ok(boolean o) { long ret = bindings.CResult_boolLightningErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_boolLightningErrorZ extends CommonBase { */ public static Result_boolLightningErrorZ err(LightningError e) { long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_boolLightningErrorZ extends CommonBase { */ public Result_boolLightningErrorZ clone() { long ret = bindings.CResult_boolLightningErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java b/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java index cde911e5..77b2b33a 100644 --- a/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java @@ -43,7 +43,7 @@ public class Result_boolPeerHandleErrorZ extends CommonBase { */ public static Result_boolPeerHandleErrorZ ok(boolean o) { long ret = bindings.CResult_boolPeerHandleErrorZ_ok(o); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -53,7 +53,7 @@ public class Result_boolPeerHandleErrorZ extends CommonBase { */ public static Result_boolPeerHandleErrorZ err(PeerHandleError e) { long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -64,7 +64,7 @@ public class Result_boolPeerHandleErrorZ extends CommonBase { */ public Result_boolPeerHandleErrorZ clone() { long ret = bindings.CResult_boolPeerHandleErrorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RevokeAndACK.java b/src/main/java/org/ldk/structs/RevokeAndACK.java index 8ae79682..4e66f4d7 100644 --- a/src/main/java/org/ldk/structs/RevokeAndACK.java +++ b/src/main/java/org/ldk/structs/RevokeAndACK.java @@ -69,7 +69,7 @@ public class RevokeAndACK extends CommonBase { */ public static RevokeAndACK of(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) { long ret = bindings.RevokeAndACK_new(channel_id_arg, per_commitment_secret_arg, next_per_commitment_point_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -80,7 +80,7 @@ public class RevokeAndACK extends CommonBase { */ public RevokeAndACK clone() { long ret = bindings.RevokeAndACK_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -99,7 +99,7 @@ public class RevokeAndACK extends CommonBase { */ public static Result_RevokeAndACKDecodeErrorZ read(byte[] ser) { long ret = bindings.RevokeAndACK_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Route.java b/src/main/java/org/ldk/structs/Route.java index 6aad4ee7..e0c5db9b 100644 --- a/src/main/java/org/ldk/structs/Route.java +++ b/src/main/java/org/ldk/structs/Route.java @@ -62,7 +62,7 @@ public class Route extends CommonBase { */ public static Route of(RouteHop[][] paths_arg) { long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).map(paths_arg_conv_12 -> paths_arg_conv_12 != null ? Arrays.stream(paths_arg_conv_12).mapToLong(paths_arg_conv_12_conv_10 -> paths_arg_conv_12_conv_10 == null ? 0 : paths_arg_conv_12_conv_10.ptr & ~1).toArray() : null).toArray(long[][]::new) : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Route ret_hu_conv = new Route(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -73,7 +73,7 @@ public class Route extends CommonBase { */ public Route clone() { long ret = bindings.Route_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Route ret_hu_conv = new Route(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -130,7 +130,7 @@ public class Route extends CommonBase { */ public static Result_RouteDecodeErrorZ read(byte[] ser) { long ret = bindings.Route_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RouteHint.java b/src/main/java/org/ldk/structs/RouteHint.java index fda75424..9e87ee70 100644 --- a/src/main/java/org/ldk/structs/RouteHint.java +++ b/src/main/java/org/ldk/structs/RouteHint.java @@ -24,7 +24,7 @@ public class RouteHint extends CommonBase { */ public RouteHint clone() { long ret = bindings.RouteHint_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHint ret_hu_conv = new RouteHint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/RouteHintHop.java b/src/main/java/org/ldk/structs/RouteHintHop.java index c9f12114..fd5111b4 100644 --- a/src/main/java/org/ldk/structs/RouteHintHop.java +++ b/src/main/java/org/ldk/structs/RouteHintHop.java @@ -54,7 +54,7 @@ public class RouteHintHop extends CommonBase { */ public RoutingFees get_fees() { long ret = bindings.RouteHintHop_get_fees(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingFees ret_hu_conv = new RoutingFees(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -87,7 +87,7 @@ public class RouteHintHop extends CommonBase { */ public Option_u64Z get_htlc_minimum_msat() { long ret = bindings.RouteHintHop_get_htlc_minimum_msat(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -105,7 +105,7 @@ public class RouteHintHop extends CommonBase { */ public Option_u64Z get_htlc_maximum_msat() { long ret = bindings.RouteHintHop_get_htlc_maximum_msat(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -123,7 +123,7 @@ public class RouteHintHop extends CommonBase { */ public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, Option_u64Z htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg) { long ret = bindings.RouteHintHop_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHintHop ret_hu_conv = new RouteHintHop(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -134,7 +134,7 @@ public class RouteHintHop extends CommonBase { */ public RouteHintHop clone() { long ret = bindings.RouteHintHop_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHintHop ret_hu_conv = new RouteHintHop(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/RouteHop.java b/src/main/java/org/ldk/structs/RouteHop.java index a8d0e9ff..10bb9ece 100644 --- a/src/main/java/org/ldk/structs/RouteHop.java +++ b/src/main/java/org/ldk/structs/RouteHop.java @@ -40,7 +40,7 @@ public class RouteHop extends CommonBase { */ public NodeFeatures get_node_features() { long ret = bindings.RouteHop_get_node_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -75,7 +75,7 @@ public class RouteHop extends CommonBase { */ public ChannelFeatures get_channel_features() { long ret = bindings.RouteHop_get_channel_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -130,7 +130,7 @@ public class RouteHop extends CommonBase { */ public static RouteHop of(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg) { long ret = bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHop ret_hu_conv = new RouteHop(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -141,7 +141,7 @@ public class RouteHop extends CommonBase { */ public RouteHop clone() { long ret = bindings.RouteHop_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RouteHop ret_hu_conv = new RouteHop(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -179,7 +179,7 @@ public class RouteHop extends CommonBase { */ public static Result_RouteHopDecodeErrorZ read(byte[] ser) { long ret = bindings.RouteHop_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index d26f518f..4fd4d255 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -56,7 +56,7 @@ public class RoutingFees extends CommonBase { */ public static RoutingFees of(int base_msat_arg, int proportional_millionths_arg) { long ret = bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingFees ret_hu_conv = new RoutingFees(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -78,7 +78,7 @@ public class RoutingFees extends CommonBase { */ public RoutingFees clone() { long ret = bindings.RoutingFees_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RoutingFees ret_hu_conv = new RoutingFees(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -105,7 +105,7 @@ public class RoutingFees extends CommonBase { */ public static Result_RoutingFeesDecodeErrorZ read(byte[] ser) { long ret = bindings.RoutingFees_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/RoutingMessageHandler.java b/src/main/java/org/ldk/structs/RoutingMessageHandler.java index 9791eeea..c16d0bd9 100644 --- a/src/main/java/org/ldk/structs/RoutingMessageHandler.java +++ b/src/main/java/org/ldk/structs/RoutingMessageHandler.java @@ -174,7 +174,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_boolLightningErrorZ handle_node_announcement(NodeAnnouncement msg) { long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -186,7 +186,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_boolLightningErrorZ handle_channel_announcement(ChannelAnnouncement msg) { long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -198,7 +198,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_boolLightningErrorZ handle_channel_update(ChannelUpdate msg) { long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret); this.ptrs_to.add(msg); return ret_hu_conv; @@ -258,7 +258,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_NoneLightningErrorZ handle_reply_channel_range(byte[] their_node_id, ReplyChannelRange msg) { long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -271,7 +271,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_NoneLightningErrorZ handle_reply_short_channel_ids_end(byte[] their_node_id, ReplyShortChannelIdsEnd msg) { long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -282,7 +282,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_NoneLightningErrorZ handle_query_channel_range(byte[] their_node_id, QueryChannelRange msg) { long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -293,7 +293,7 @@ public class RoutingMessageHandler extends CommonBase { */ public Result_NoneLightningErrorZ handle_query_short_channel_ids(byte[] their_node_id, QueryShortChannelIds msg) { long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Sha256.java b/src/main/java/org/ldk/structs/Sha256.java index 8eae3932..4cdcbf79 100644 --- a/src/main/java/org/ldk/structs/Sha256.java +++ b/src/main/java/org/ldk/structs/Sha256.java @@ -24,7 +24,7 @@ public class Sha256 extends CommonBase { */ public Sha256 clone() { long ret = bindings.Sha256_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sha256 ret_hu_conv = new Sha256(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/Shutdown.java b/src/main/java/org/ldk/structs/Shutdown.java index e35dd79f..187027b4 100644 --- a/src/main/java/org/ldk/structs/Shutdown.java +++ b/src/main/java/org/ldk/structs/Shutdown.java @@ -56,7 +56,7 @@ public class Shutdown extends CommonBase { */ public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) { long ret = bindings.Shutdown_new(channel_id_arg, scriptpubkey_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Shutdown ret_hu_conv = new Shutdown(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -67,7 +67,7 @@ public class Shutdown extends CommonBase { */ public Shutdown clone() { long ret = bindings.Shutdown_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Shutdown ret_hu_conv = new Shutdown(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -86,7 +86,7 @@ public class Shutdown extends CommonBase { */ public static Result_ShutdownDecodeErrorZ read(byte[] ser) { long ret = bindings.Shutdown_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/ShutdownScript.java b/src/main/java/org/ldk/structs/ShutdownScript.java index f6343a16..f63fed8a 100644 --- a/src/main/java/org/ldk/structs/ShutdownScript.java +++ b/src/main/java/org/ldk/structs/ShutdownScript.java @@ -26,7 +26,7 @@ public class ShutdownScript extends CommonBase { */ public ShutdownScript clone() { long ret = bindings.ShutdownScript_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -45,7 +45,7 @@ public class ShutdownScript extends CommonBase { */ public static Result_ShutdownScriptDecodeErrorZ read(byte[] ser) { long ret = bindings.ShutdownScript_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -55,7 +55,7 @@ public class ShutdownScript extends CommonBase { */ public static ShutdownScript new_p2pkh(byte[] pubkey_hash) { long ret = bindings.ShutdownScript_new_p2pkh(pubkey_hash); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -66,7 +66,7 @@ public class ShutdownScript extends CommonBase { */ public static ShutdownScript new_p2sh(byte[] script_hash) { long ret = bindings.ShutdownScript_new_p2sh(script_hash); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -77,7 +77,7 @@ public class ShutdownScript extends CommonBase { */ public static ShutdownScript new_p2wpkh(byte[] pubkey_hash) { long ret = bindings.ShutdownScript_new_p2wpkh(pubkey_hash); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -88,7 +88,7 @@ public class ShutdownScript extends CommonBase { */ public static ShutdownScript new_p2wsh(byte[] script_hash) { long ret = bindings.ShutdownScript_new_p2wsh(script_hash); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ShutdownScript ret_hu_conv = new ShutdownScript(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -106,7 +106,7 @@ public class ShutdownScript extends CommonBase { */ public static Result_ShutdownScriptInvalidShutdownScriptZ new_witness_program(byte version, byte[] program) { long ret = bindings.ShutdownScript_new_witness_program(version, program); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/Sign.java b/src/main/java/org/ldk/structs/Sign.java index d884c2e2..48268cde 100644 --- a/src/main/java/org/ldk/structs/Sign.java +++ b/src/main/java/org/ldk/structs/Sign.java @@ -68,7 +68,7 @@ public class Sign extends CommonBase { */ public Sign clone() { long ret = bindings.Sign_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Sign ret_hu_conv = new Sign(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/SignOrCreationError.java b/src/main/java/org/ldk/structs/SignOrCreationError.java index 7b3c01bc..2508cb42 100644 --- a/src/main/java/org/ldk/structs/SignOrCreationError.java +++ b/src/main/java/org/ldk/structs/SignOrCreationError.java @@ -47,7 +47,7 @@ public class SignOrCreationError extends CommonBase { */ public SignOrCreationError clone() { long ret = bindings.SignOrCreationError_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -58,7 +58,7 @@ public class SignOrCreationError extends CommonBase { */ public static SignOrCreationError sign_error() { long ret = bindings.SignOrCreationError_sign_error(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -69,7 +69,7 @@ public class SignOrCreationError extends CommonBase { */ public static SignOrCreationError creation_error(org.ldk.enums.CreationError a) { long ret = bindings.SignOrCreationError_creation_error(a); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/SignedRawInvoice.java b/src/main/java/org/ldk/structs/SignedRawInvoice.java index 90714a61..048cac3b 100644 --- a/src/main/java/org/ldk/structs/SignedRawInvoice.java +++ b/src/main/java/org/ldk/structs/SignedRawInvoice.java @@ -39,7 +39,7 @@ public class SignedRawInvoice extends CommonBase { */ public SignedRawInvoice clone() { long ret = bindings.SignedRawInvoice_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SignedRawInvoice ret_hu_conv = new SignedRawInvoice(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -53,7 +53,7 @@ public class SignedRawInvoice extends CommonBase { */ public ThreeTuple_RawInvoice_u832InvoiceSignatureZ into_parts() { long ret = bindings.SignedRawInvoice_into_parts(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ThreeTuple_RawInvoice_u832InvoiceSignatureZ ret_hu_conv = new ThreeTuple_RawInvoice_u832InvoiceSignatureZ(null, ret); ret_hu_conv.ptrs_to.add(this); ; @@ -65,7 +65,7 @@ public class SignedRawInvoice extends CommonBase { */ public RawInvoice raw_invoice() { long ret = bindings.SignedRawInvoice_raw_invoice(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } RawInvoice ret_hu_conv = new RawInvoice(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class SignedRawInvoice extends CommonBase { */ public InvoiceSignature signature() { long ret = bindings.SignedRawInvoice_signature(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } InvoiceSignature ret_hu_conv = new InvoiceSignature(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -95,7 +95,7 @@ public class SignedRawInvoice extends CommonBase { */ public Result_PayeePubKeyErrorZ recover_payee_pub_key() { long ret = bindings.SignedRawInvoice_recover_payee_pub_key(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PayeePubKeyErrorZ ret_hu_conv = Result_PayeePubKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -114,7 +114,7 @@ public class SignedRawInvoice extends CommonBase { */ public static Result_SignedRawInvoiceNoneZ from_str(java.lang.String s) { long ret = bindings.SignedRawInvoice_from_str(s); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/SocketDescriptor.java b/src/main/java/org/ldk/structs/SocketDescriptor.java index c1bdaf55..fd8454c7 100644 --- a/src/main/java/org/ldk/structs/SocketDescriptor.java +++ b/src/main/java/org/ldk/structs/SocketDescriptor.java @@ -144,7 +144,7 @@ public class SocketDescriptor extends CommonBase { */ public SocketDescriptor clone() { long ret = bindings.SocketDescriptor_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SocketDescriptor ret_hu_conv = new SocketDescriptor(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java index 8f859fa6..01a17958 100644 --- a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java @@ -81,7 +81,7 @@ public class SpendableOutputDescriptor extends CommonBase { */ public SpendableOutputDescriptor clone() { long ret = bindings.SpendableOutputDescriptor_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -92,7 +92,7 @@ public class SpendableOutputDescriptor extends CommonBase { */ public static SpendableOutputDescriptor static_output(OutPoint outpoint, TxOut output) { long ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr & ~1, output.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -103,7 +103,7 @@ public class SpendableOutputDescriptor extends CommonBase { */ public static SpendableOutputDescriptor delayed_payment_output(DelayedPaymentOutputDescriptor a) { long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -114,7 +114,7 @@ public class SpendableOutputDescriptor extends CommonBase { */ public static SpendableOutputDescriptor static_payment_output(StaticPaymentOutputDescriptor a) { long ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } SpendableOutputDescriptor ret_hu_conv = SpendableOutputDescriptor.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -133,7 +133,7 @@ public class SpendableOutputDescriptor extends CommonBase { */ public static Result_SpendableOutputDescriptorDecodeErrorZ read(byte[] ser) { long ret = bindings.SpendableOutputDescriptor_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SpendableOutputDescriptorDecodeErrorZ ret_hu_conv = Result_SpendableOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java index a487e027..9f15a3ad 100644 --- a/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java @@ -25,7 +25,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { */ public OutPoint get_outpoint() { long ret = bindings.StaticPaymentOutputDescriptor_get_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { */ public static StaticPaymentOutputDescriptor of(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, output_arg.ptr, channel_keys_id_arg, channel_value_satoshis_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -95,7 +95,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { */ public StaticPaymentOutputDescriptor clone() { long ret = bindings.StaticPaymentOutputDescriptor_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -114,7 +114,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase { */ public static Result_StaticPaymentOutputDescriptorDecodeErrorZ read(byte[] ser) { long ret = bindings.StaticPaymentOutputDescriptor_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java b/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java index 5f425d94..f5fe67f1 100644 --- a/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java +++ b/src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java @@ -37,7 +37,7 @@ public class TrustedCommitmentTransaction extends CommonBase { */ public BuiltCommitmentTransaction built_transaction() { long ret = bindings.TrustedCommitmentTransaction_built_transaction(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -48,7 +48,7 @@ public class TrustedCommitmentTransaction extends CommonBase { */ public TxCreationKeys keys() { long ret = bindings.TrustedCommitmentTransaction_keys(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -62,7 +62,7 @@ public class TrustedCommitmentTransaction extends CommonBase { */ public Result_CVec_SignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, DirectedChannelTransactionParameters channel_parameters) { long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, htlc_base_key, channel_parameters == null ? 0 : channel_parameters.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret); this.ptrs_to.add(channel_parameters); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java index bc259309..f2de1766 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelManagerZ.java @@ -32,7 +32,7 @@ public class TwoTuple_BlockHashChannelManagerZ extends CommonBase { */ public ChannelManager get_b() { long ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelManager ret_hu_conv = new ChannelManager(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -43,7 +43,7 @@ public class TwoTuple_BlockHashChannelManagerZ extends CommonBase { */ public static TwoTuple_BlockHashChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) { long ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(a, bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr & ~1, b_params == null ? 0 : b_params.ptr & ~1)); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(b_fee_est); diff --git a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java index 1eba26ba..c3e897ca 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_BlockHashChannelMonitorZ.java @@ -32,7 +32,7 @@ public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase { */ public ChannelMonitor get_b() { long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_get_b(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelMonitor ret_hu_conv = new ChannelMonitor(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -44,7 +44,7 @@ public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase { */ public TwoTuple_BlockHashChannelMonitorZ clone() { long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -55,7 +55,7 @@ public class TwoTuple_BlockHashChannelMonitorZ extends CommonBase { */ public static TwoTuple_BlockHashChannelMonitorZ of(byte[] a, ChannelMonitor b) { long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_new(a, b == null ? 0 : b.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_BlockHashChannelMonitorZ ret_hu_conv = new TwoTuple_BlockHashChannelMonitorZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java index a16beaac..a63afed2 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java @@ -24,7 +24,7 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { */ public OutPoint get_a() { long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -44,7 +44,7 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { */ public TwoTuple_OutPointScriptZ clone() { long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -55,7 +55,7 @@ public class TwoTuple_OutPointScriptZ extends CommonBase { */ public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) { long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java b/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java index d8453596..1a197529 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java @@ -41,7 +41,7 @@ public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase { */ public TwoTuple_PaymentHashPaymentSecretZ clone() { long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -52,7 +52,7 @@ public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase { */ public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) { long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java b/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java index 2da8905e..baf3eeb7 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_PublicKeyTypeZ.java @@ -32,7 +32,7 @@ public class TwoTuple_PublicKeyTypeZ extends CommonBase { */ public Type get_b() { long ret = bindings.C2Tuple_PublicKeyTypeZ_get_b(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Type ret_hu_conv = new Type(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -44,7 +44,7 @@ public class TwoTuple_PublicKeyTypeZ extends CommonBase { */ public TwoTuple_PublicKeyTypeZ clone() { long ret = bindings.C2Tuple_PublicKeyTypeZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -55,7 +55,7 @@ public class TwoTuple_PublicKeyTypeZ extends CommonBase { */ public static TwoTuple_PublicKeyTypeZ of(byte[] a, Type b) { long ret = bindings.C2Tuple_PublicKeyTypeZ_new(a, b == null ? 0 : b.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_PublicKeyTypeZ ret_hu_conv = new TwoTuple_PublicKeyTypeZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); ret_hu_conv.ptrs_to.add(b); diff --git a/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java b/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java index f4cc14f7..107d0aea 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_SignatureCVec_SignatureZZ.java @@ -41,7 +41,7 @@ public class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase { */ public TwoTuple_SignatureCVec_SignatureZZ clone() { long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -52,7 +52,7 @@ public class TwoTuple_SignatureCVec_SignatureZZ extends CommonBase { */ public static TwoTuple_SignatureCVec_SignatureZZ of(byte[] a, byte[][] b) { long ret = bindings.C2Tuple_SignatureCVec_SignatureZZ_new(a, b); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_SignatureCVec_SignatureZZ ret_hu_conv = new TwoTuple_SignatureCVec_SignatureZZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java index 671f4469..12e461b0 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ.java @@ -48,7 +48,7 @@ public class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase { */ public TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ clone() { long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -59,7 +59,7 @@ public class TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ extends CommonBase { */ public static TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ of(byte[] a, TwoTuple_u32ScriptZ[] b) { long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_21 -> b_conv_21 != null ? b_conv_21.ptr : 0).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32ScriptZZZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java index 4a4149f3..43083869 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ.java @@ -48,7 +48,7 @@ public class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase { */ public TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ clone() { long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -59,7 +59,7 @@ public class TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ extends CommonBase { */ public static TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) { long ret = bindings.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ ret_hu_conv = new TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java b/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java index 7188134f..4097de57 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_u32ScriptZ.java @@ -41,7 +41,7 @@ public class TwoTuple_u32ScriptZ extends CommonBase { */ public TwoTuple_u32ScriptZ clone() { long ret = bindings.C2Tuple_u32ScriptZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -52,7 +52,7 @@ public class TwoTuple_u32ScriptZ extends CommonBase { */ public static TwoTuple_u32ScriptZ of(int a, byte[] b) { long ret = bindings.C2Tuple_u32ScriptZ_new(a, b); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_u32ScriptZ ret_hu_conv = new TwoTuple_u32ScriptZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java b/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java index 7af23883..ee5d9c96 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_u32TxOutZ.java @@ -32,7 +32,7 @@ public class TwoTuple_u32TxOutZ extends CommonBase { */ public TxOut get_b() { long ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TxOut ret_conv = new TxOut(null, ret); return ret_conv; } @@ -43,7 +43,7 @@ public class TwoTuple_u32TxOutZ extends CommonBase { */ public TwoTuple_u32TxOutZ clone() { long ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -54,7 +54,7 @@ public class TwoTuple_u32TxOutZ extends CommonBase { */ public static TwoTuple_u32TxOutZ of(int a, TxOut b) { long ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java b/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java index 54b5a648..fd8e186c 100644 --- a/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java +++ b/src/main/java/org/ldk/structs/TwoTuple_usizeTransactionZ.java @@ -41,7 +41,7 @@ public class TwoTuple_usizeTransactionZ extends CommonBase { */ public TwoTuple_usizeTransactionZ clone() { long ret = bindings.C2Tuple_usizeTransactionZ_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -52,7 +52,7 @@ public class TwoTuple_usizeTransactionZ extends CommonBase { */ public static TwoTuple_usizeTransactionZ of(long a, byte[] b) { long ret = bindings.C2Tuple_usizeTransactionZ_new(a, b); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TwoTuple_usizeTransactionZ ret_hu_conv = new TwoTuple_usizeTransactionZ(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/TxCreationKeys.java b/src/main/java/org/ldk/structs/TxCreationKeys.java index 796c3b60..54ce9831 100644 --- a/src/main/java/org/ldk/structs/TxCreationKeys.java +++ b/src/main/java/org/ldk/structs/TxCreationKeys.java @@ -113,7 +113,7 @@ public class TxCreationKeys extends CommonBase { */ public static TxCreationKeys of(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg) { long ret = bindings.TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -124,7 +124,7 @@ public class TxCreationKeys extends CommonBase { */ public TxCreationKeys clone() { long ret = bindings.TxCreationKeys_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -143,7 +143,7 @@ public class TxCreationKeys extends CommonBase { */ public static Result_TxCreationKeysDecodeErrorZ read(byte[] ser) { long ret = bindings.TxCreationKeys_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -154,7 +154,7 @@ public class TxCreationKeys extends CommonBase { */ public static Result_TxCreationKeysErrorZ derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) { long ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -165,7 +165,7 @@ public class TxCreationKeys extends CommonBase { */ public static Result_TxCreationKeysErrorZ from_channel_static_keys(byte[] per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) { long ret = bindings.TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(broadcaster_keys); ret_hu_conv.ptrs_to.add(countersignatory_keys); diff --git a/src/main/java/org/ldk/structs/Type.java b/src/main/java/org/ldk/structs/Type.java index 4afa8fb5..62be067b 100644 --- a/src/main/java/org/ldk/structs/Type.java +++ b/src/main/java/org/ldk/structs/Type.java @@ -87,7 +87,7 @@ public class Type extends CommonBase { */ public Type clone() { long ret = bindings.Type_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Type ret_hu_conv = new Type(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java index d0ff748a..d0d7662f 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java @@ -24,7 +24,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { */ public ChannelFeatures get_features() { long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -132,7 +132,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { */ public UnsignedChannelAnnouncement clone() { long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -151,7 +151,7 @@ public class UnsignedChannelAnnouncement extends CommonBase { */ public static Result_UnsignedChannelAnnouncementDecodeErrorZ read(byte[] ser) { long ret = bindings.UnsignedChannelAnnouncement_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java index 242b5819..263dd914 100644 --- a/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java +++ b/src/main/java/org/ldk/structs/UnsignedChannelUpdate.java @@ -158,7 +158,7 @@ public class UnsignedChannelUpdate extends CommonBase { */ public UnsignedChannelUpdate clone() { long ret = bindings.UnsignedChannelUpdate_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -177,7 +177,7 @@ public class UnsignedChannelUpdate extends CommonBase { */ public static Result_UnsignedChannelUpdateDecodeErrorZ read(byte[] ser) { long ret = bindings.UnsignedChannelUpdate_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java b/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java index 1014dbee..313a410f 100644 --- a/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java +++ b/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java @@ -24,7 +24,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { */ public NodeFeatures get_features() { long ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -113,7 +113,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { */ public UnsignedNodeAnnouncement clone() { long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -132,7 +132,7 @@ public class UnsignedNodeAnnouncement extends CommonBase { */ public static Result_UnsignedNodeAnnouncementDecodeErrorZ read(byte[] ser) { long ret = bindings.UnsignedNodeAnnouncement_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UpdateAddHTLC.java b/src/main/java/org/ldk/structs/UpdateAddHTLC.java index 23448cd9..c0c56a16 100644 --- a/src/main/java/org/ldk/structs/UpdateAddHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateAddHTLC.java @@ -99,7 +99,7 @@ public class UpdateAddHTLC extends CommonBase { */ public UpdateAddHTLC clone() { long ret = bindings.UpdateAddHTLC_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -118,7 +118,7 @@ public class UpdateAddHTLC extends CommonBase { */ public static Result_UpdateAddHTLCDecodeErrorZ read(byte[] ser) { long ret = bindings.UpdateAddHTLC_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UpdateFailHTLC.java b/src/main/java/org/ldk/structs/UpdateFailHTLC.java index e1126ae4..7f2c350c 100644 --- a/src/main/java/org/ldk/structs/UpdateFailHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFailHTLC.java @@ -54,7 +54,7 @@ public class UpdateFailHTLC extends CommonBase { */ public UpdateFailHTLC clone() { long ret = bindings.UpdateFailHTLC_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -73,7 +73,7 @@ public class UpdateFailHTLC extends CommonBase { */ public static Result_UpdateFailHTLCDecodeErrorZ read(byte[] ser) { long ret = bindings.UpdateFailHTLC_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java index dab67c14..40f02c29 100644 --- a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java @@ -69,7 +69,7 @@ public class UpdateFailMalformedHTLC extends CommonBase { */ public UpdateFailMalformedHTLC clone() { long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -88,7 +88,7 @@ public class UpdateFailMalformedHTLC extends CommonBase { */ public static Result_UpdateFailMalformedHTLCDecodeErrorZ read(byte[] ser) { long ret = bindings.UpdateFailMalformedHTLC_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UpdateFee.java b/src/main/java/org/ldk/structs/UpdateFee.java index b9062389..c477be15 100644 --- a/src/main/java/org/ldk/structs/UpdateFee.java +++ b/src/main/java/org/ldk/structs/UpdateFee.java @@ -54,7 +54,7 @@ public class UpdateFee extends CommonBase { */ public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) { long ret = bindings.UpdateFee_new(channel_id_arg, feerate_per_kw_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFee ret_hu_conv = new UpdateFee(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -65,7 +65,7 @@ public class UpdateFee extends CommonBase { */ public UpdateFee clone() { long ret = bindings.UpdateFee_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFee ret_hu_conv = new UpdateFee(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -84,7 +84,7 @@ public class UpdateFee extends CommonBase { */ public static Result_UpdateFeeDecodeErrorZ read(byte[] ser) { long ret = bindings.UpdateFee_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java b/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java index 626a78df..606408db 100644 --- a/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFulfillHTLC.java @@ -69,7 +69,7 @@ public class UpdateFulfillHTLC extends CommonBase { */ public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) { long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg, htlc_id_arg, payment_preimage_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -80,7 +80,7 @@ public class UpdateFulfillHTLC extends CommonBase { */ public UpdateFulfillHTLC clone() { long ret = bindings.UpdateFulfillHTLC_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -99,7 +99,7 @@ public class UpdateFulfillHTLC extends CommonBase { */ public static Result_UpdateFulfillHTLCDecodeErrorZ read(byte[] ser) { long ret = bindings.UpdateFulfillHTLC_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/UserConfig.java b/src/main/java/org/ldk/structs/UserConfig.java index c87a27f7..97efe649 100644 --- a/src/main/java/org/ldk/structs/UserConfig.java +++ b/src/main/java/org/ldk/structs/UserConfig.java @@ -27,7 +27,7 @@ public class UserConfig extends CommonBase { */ public ChannelHandshakeConfig get_own_channel_config() { long ret = bindings.UserConfig_get_own_channel_config(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -45,7 +45,7 @@ public class UserConfig extends CommonBase { */ public ChannelHandshakeLimits get_peer_channel_config_limits() { long ret = bindings.UserConfig_get_peer_channel_config_limits(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -63,7 +63,7 @@ public class UserConfig extends CommonBase { */ public ChannelConfig get_channel_options() { long ret = bindings.UserConfig_get_channel_options(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } ChannelConfig ret_hu_conv = new ChannelConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -126,7 +126,7 @@ public class UserConfig extends CommonBase { */ public static UserConfig of(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg, boolean accept_forwards_to_priv_channels_arg) { long ret = bindings.UserConfig_new(own_channel_config_arg == null ? 0 : own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg == null ? 0 : peer_channel_config_limits_arg.ptr & ~1, channel_options_arg == null ? 0 : channel_options_arg.ptr & ~1, accept_forwards_to_priv_channels_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UserConfig ret_hu_conv = new UserConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -137,7 +137,7 @@ public class UserConfig extends CommonBase { */ public UserConfig clone() { long ret = bindings.UserConfig_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UserConfig ret_hu_conv = new UserConfig(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -148,7 +148,7 @@ public class UserConfig extends CommonBase { */ public static UserConfig with_default() { long ret = bindings.UserConfig_default(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } UserConfig ret_hu_conv = new UserConfig(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; diff --git a/src/main/java/org/ldk/structs/UtilMethods.java b/src/main/java/org/ldk/structs/UtilMethods.java index 5a59f559..9978b40e 100644 --- a/src/main/java/org/ldk/structs/UtilMethods.java +++ b/src/main/java/org/ldk/structs/UtilMethods.java @@ -12,7 +12,7 @@ public class UtilMethods { */ public static Result_StringErrorZ sign(byte[] msg, byte[] sk) { long ret = bindings.sign(msg, sk); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_StringErrorZ ret_hu_conv = Result_StringErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -22,7 +22,7 @@ public class UtilMethods { */ public static Result_PublicKeyErrorZ recover_pk(byte[] msg, java.lang.String sig) { long ret = bindings.recover_pk(msg, sig); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -41,7 +41,7 @@ public class UtilMethods { */ public static Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, KeysInterface arg) { long ret = bindings.C2Tuple_BlockHashChannelMonitorZ_read(ser, arg == null ? 0 : arg.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(arg); return ret_hu_conv; @@ -52,7 +52,7 @@ public class UtilMethods { */ public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(byte[] ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) { long ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray() : null)); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(arg_keys_manager); ret_hu_conv.ptrs_to.add(arg_fee_estimator); @@ -89,7 +89,7 @@ public class UtilMethods { */ public static Result_SecretKeyErrorZ derive_private_key(byte[] per_commitment_point, byte[] base_secret) { long ret = bindings.derive_private_key(per_commitment_point, base_secret); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -104,7 +104,7 @@ public class UtilMethods { */ public static Result_PublicKeyErrorZ derive_public_key(byte[] per_commitment_point, byte[] base_point) { long ret = bindings.derive_public_key(per_commitment_point, base_point); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -122,7 +122,7 @@ public class UtilMethods { */ public static Result_SecretKeyErrorZ derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret) { long ret = bindings.derive_private_revocation_key(per_commitment_secret, countersignatory_revocation_base_secret); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_SecretKeyErrorZ ret_hu_conv = Result_SecretKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -142,7 +142,7 @@ public class UtilMethods { */ public static Result_PublicKeyErrorZ derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point) { long ret = bindings.derive_public_revocation_key(per_commitment_point, countersignatory_revocation_base_point); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_PublicKeyErrorZ ret_hu_conv = Result_PublicKeyErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -214,7 +214,7 @@ public class UtilMethods { */ public static Result_RouteLightningErrorZ get_keysend_route(byte[] our_node_id, NetworkGraph network, byte[] payee, @Nullable ChannelDetails[] first_hops, RouteHint[] last_hops, long final_value_msat, int final_cltv, Logger logger) { long ret = bindings.get_keysend_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray() : null, last_hops != null ? Arrays.stream(last_hops).mapToLong(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray() : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(network); for (ChannelDetails first_hops_conv_16: first_hops) { ret_hu_conv.ptrs_to.add(first_hops_conv_16); }; @@ -248,7 +248,7 @@ public class UtilMethods { */ public static Result_RouteLightningErrorZ get_route(byte[] our_node_id, NetworkGraph network, byte[] payee, @Nullable InvoiceFeatures payee_features, @Nullable ChannelDetails[] first_hops, RouteHint[] last_hops, long final_value_msat, int final_cltv, Logger logger) { long ret = bindings.get_route(our_node_id, network == null ? 0 : network.ptr & ~1, payee, payee_features == null ? 0 : payee_features.ptr & ~1, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr & ~1).toArray() : null, last_hops != null ? Arrays.stream(last_hops).mapToLong(last_hops_conv_11 -> last_hops_conv_11 == null ? 0 : last_hops_conv_11.ptr & ~1).toArray() : null, final_value_msat, final_cltv, logger == null ? 0 : logger.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(network); for (ChannelDetails first_hops_conv_16: first_hops) { ret_hu_conv.ptrs_to.add(first_hops_conv_16); }; @@ -262,7 +262,7 @@ public class UtilMethods { */ public static Result_NoneErrorZ FilesystemPersister_persist_manager(java.lang.String data_dir, ChannelManager manager) { long ret = bindings.FilesystemPersister_persist_manager(data_dir, manager == null ? 0 : manager.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(manager); return ret_hu_conv; @@ -277,7 +277,7 @@ public class UtilMethods { */ public static Result_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(ChannelManager channelmanager, KeysInterface keys_manager, org.ldk.enums.Currency network, Option_u64Z amt_msat, java.lang.String description) { long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr & ~1, keys_manager == null ? 0 : keys_manager.ptr, network, amt_msat.ptr, description); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_InvoiceSignOrCreationErrorZ ret_hu_conv = Result_InvoiceSignOrCreationErrorZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(channelmanager); ret_hu_conv.ptrs_to.add(keys_manager); diff --git a/src/main/java/org/ldk/structs/Watch.java b/src/main/java/org/ldk/structs/Watch.java index 0bf1944f..9bf7a603 100644 --- a/src/main/java/org/ldk/structs/Watch.java +++ b/src/main/java/org/ldk/structs/Watch.java @@ -115,7 +115,7 @@ public class Watch extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ watch_channel(OutPoint funding_txo, ChannelMonitor monitor) { long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr & ~1, monitor == null ? 0 : monitor.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -131,7 +131,7 @@ public class Watch extends CommonBase { */ public Result_NoneChannelMonitorUpdateErrZ update_channel(OutPoint funding_txo, ChannelMonitorUpdate update) { long ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr & ~1, update == null ? 0 : update.ptr & ~1); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } diff --git a/src/main/java/org/ldk/structs/WatchedOutput.java b/src/main/java/org/ldk/structs/WatchedOutput.java index 1a90bb33..bfb95328 100644 --- a/src/main/java/org/ldk/structs/WatchedOutput.java +++ b/src/main/java/org/ldk/structs/WatchedOutput.java @@ -54,7 +54,7 @@ public class WatchedOutput extends CommonBase { */ public OutPoint get_outpoint() { long ret = bindings.WatchedOutput_get_outpoint(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } OutPoint ret_hu_conv = new OutPoint(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -87,7 +87,7 @@ public class WatchedOutput extends CommonBase { */ public static WatchedOutput of(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg) { long ret = bindings.WatchedOutput_new(block_hash_arg, outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, script_pubkey_arg); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } WatchedOutput ret_hu_conv = new WatchedOutput(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -98,7 +98,7 @@ public class WatchedOutput extends CommonBase { */ public WatchedOutput clone() { long ret = bindings.WatchedOutput_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } WatchedOutput ret_hu_conv = new WatchedOutput(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; diff --git a/ts/bindings.c b/ts/bindings.c index 801f4ebd..b387b4e6 100644 --- a/ts/bindings.c +++ b/ts/bindings.c @@ -18,7 +18,7 @@ void *malloc(size_t size); void free(void *ptr); #define MALLOC(a, _) malloc(a) -#define FREE(p) if ((long)(p) > 1024) { free(p); } +#define FREE(p) if ((unsigned long)(p) > 1024) { free(p); } #define DO_ASSERT(a) (void)(a) #define CHECK(a) diff --git a/ts/bindings.c.body b/ts/bindings.c.body index 066ba66d..ee5550d1 100644 --- a/ts/bindings.c.body +++ b/ts/bindings.c.body @@ -16,7 +16,7 @@ void *malloc(size_t size); void free(void *ptr); #define MALLOC(a, _) malloc(a) -#define FREE(p) if ((long)(p) > 1024) { free(p); } +#define FREE(p) if ((unsigned long)(p) > 1024) { free(p); } #define DO_ASSERT(a) (void)(a) #define CHECK(a) -- 2.39.5