Skip to content

Commit

Permalink
Merge pull request #155 from TheBlueMatt/main
Browse files Browse the repository at this point in the history
Cut 0.0.121.3
  • Loading branch information
TheBlueMatt committed Mar 20, 2024
2 parents e4d9e84 + 916f358 commit e434f3b
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -576,7 +576,7 @@ jobs:
android:
runs-on: ubuntu-latest
# Frankly, I'm not really sure why debian and ubuntu differ in the results here, they really shouldn't
container: debian:bullseye
container: debian:bookworm
strategy:
fail-fast: false
steps:
Expand Down
8 changes: 5 additions & 3 deletions genbindings.sh
Expand Up @@ -81,10 +81,12 @@ fi

COMMON_COMPILE="$CC -std=c11 -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-unused-function -Wno-nullability-completeness -Wno-pointer-sign -Wdate-time -ffile-prefix-map=$(pwd)="
COMMON_CC=""
if [[ "$TARGET_STRING" != *"android" ]]; then
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -mcpu=$LDK_TARGET_CPU"
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
if [[ "$TARGET_STRING" != *"android" && "$TARGET_STRING" != *"androideabi" ]]; then
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC --target=$TARGET_STRING"
fi
[[ "$TARGET_STRING" != "x86"* ]] && COMMON_CC="$COMMON_CC -mcpu=$LDK_TARGET_CPU"
[[ "$TARGET_STRING" = "x86"* ]] && COMMON_CC="$COMMON_CC -march=$LDK_TARGET_CPU -mtune=$LDK_TARGET_CPU"
[ "$IS_MAC" = "true" -a "$MACOS_SDK" != "" ] && COMMON_COMPILE="$COMMON_COMPILE -isysroot $MACOS_SDK"

DEBUG_ARG="$3"
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/BlindedFailure.java
Expand Up @@ -16,5 +16,5 @@ public enum BlindedFailure {
*/
LDKBlindedFailure_FromBlindedNode,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Bolt11SemanticError.java
Expand Up @@ -47,5 +47,5 @@ public enum Bolt11SemanticError {
*/
LDKBolt11SemanticError_ImpreciseAmount,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Bolt12SemanticError.java
Expand Up @@ -113,5 +113,5 @@ public enum Bolt12SemanticError {
*/
LDKBolt12SemanticError_MissingSignature,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/COption_NoneZ.java
Expand Up @@ -13,5 +13,5 @@ public enum COption_NoneZ {
*/
LDKCOption_NoneZ_None,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
Expand Up @@ -74,5 +74,5 @@ public enum ChannelMonitorUpdateStatus {
*/
LDKChannelMonitorUpdateStatus_UnrecoverableError,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/ChannelShutdownState.java
Expand Up @@ -32,5 +32,5 @@ public enum ChannelShutdownState {
*/
LDKChannelShutdownState_ShutdownComplete,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/ConfirmationTarget.java
Expand Up @@ -93,5 +93,5 @@ public enum ConfirmationTarget {
*/
LDKConfirmationTarget_ChannelCloseMinimum,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/CreationError.java
Expand Up @@ -34,5 +34,5 @@ public enum CreationError {
*/
LDKCreationError_MinFinalCltvExpiryDeltaTooShort,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Currency.java
Expand Up @@ -25,5 +25,5 @@ public enum Currency {
*/
LDKCurrency_Signet,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/HTLCClaim.java
Expand Up @@ -25,5 +25,5 @@ public enum HTLCClaim {
*/
LDKHTLCClaim_Revocation,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/IOError.java
Expand Up @@ -23,5 +23,5 @@ public enum IOError {
LDKIOError_Other,
LDKIOError_UnexpectedEof,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Level.java
Expand Up @@ -29,5 +29,5 @@ public enum Level {
*/
LDKLevel_Error,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Network.java
Expand Up @@ -21,5 +21,5 @@ public enum Network {
*/
LDKNetwork_Signet,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/PaymentFailureReason.java
Expand Up @@ -40,5 +40,5 @@ public enum PaymentFailureReason {
*/
LDKPaymentFailureReason_UnexpectedError,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Recipient.java
Expand Up @@ -19,5 +19,5 @@ public enum Recipient {
*/
LDKRecipient_PhantomNode,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/RetryableSendFailure.java
Expand Up @@ -30,5 +30,5 @@ public enum RetryableSendFailure {
*/
LDKRetryableSendFailure_DuplicatePayment,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/Secp256k1Error.java
Expand Up @@ -49,5 +49,5 @@ public enum Secp256k1Error {
*/
LDKSecp256k1Error_InvalidParityValue,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/SiPrefix.java
Expand Up @@ -21,5 +21,5 @@ public enum SiPrefix {
*/
LDKSiPrefix_Pico,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/SocketAddressParseError.java
Expand Up @@ -21,5 +21,5 @@ public enum SocketAddressParseError {
*/
LDKSocketAddressParseError_InvalidOnionV3,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
2 changes: 1 addition & 1 deletion src/main/java/org/ldk/enums/UtxoLookupError.java
Expand Up @@ -13,5 +13,5 @@ public enum UtxoLookupError {
*/
LDKUtxoLookupError_UnknownTx,
; static native void init();
static { init(); }
static { org.ldk.impl.bindings.run_statics(); init(); }
}
1 change: 1 addition & 0 deletions src/main/java/org/ldk/impl/bindings.java
Expand Up @@ -38,6 +38,7 @@ public class bindings {
// Fetching the LDK versions from C also checks that the header and binaries match
System.err.println("Loaded LDK-Java Bindings " + version.get_ldk_java_bindings_version() + " with LDK " + get_ldk_version() + " and LDK-C-Bindings " + get_ldk_c_bindings_version());
}
public static void run_statics() { /* Useful to force the statics to run */ }
static native void init(java.lang.Class c);
static native void init_class_cache();
static native String get_lib_version_string();
Expand Down

0 comments on commit e434f3b

Please sign in to comment.