Merge pull request #113 from TheBlueMatt/main v0.0.110.1
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Sat, 6 Aug 2022 00:25:08 +0000 (00:25 +0000)
committerGitHub <noreply@github.com>
Sat, 6 Aug 2022 00:25:08 +0000 (00:25 +0000)
Update to latest LDK-C-Bindings and fix assorted TS bugs

1  2 
genbindings.sh

diff --combined genbindings.sh
index 51c50feb6194cf809f7198d9bed799c553dd218e,ce69c8465eb28a1a7f260b18b91b71b6e330382f..491e1d425397e7f3e1d40340d249f4ca10e6c9b4
@@@ -16,10 -16,6 +16,10 @@@ usage() 
  set -e
  set -x
  
 +function is_gnu_sed(){
 +  sed --version >/dev/null 2>&1
 +}
 +
  if [ "$CC" != "" ]; then
        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)="
  else
@@@ -33,11 -29,11 +33,11 @@@ if [ "$3" = "leaks" ]; the
  fi
  
  cp "$1/lightning-c-bindings/include/lightning.h" ./
 -if [ "$(rustc --version --verbose | grep "host:")" = "host: x86_64-apple-darwin" ] || [ "$(rustc --version --verbose | grep "host:")" = "host: aarch64-apple-darwin" ]; then
 -      # OSX sed is for some reason not compatible with GNU sed
 -      sed -i '' "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h
 -else
 +if is_gnu_sed; then
        sed -i "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h
 +else
 +  # OSX sed is for some reason not compatible with GNU sed
 +      sed -i '' "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h
  fi
  
  if [ "$LDK_GARBAGECOLLECTED_GIT_OVERRIDE" = "" ]; then
@@@ -75,11 -71,11 +75,11 @@@ if [ "$2" != "wasm" ]; the
                LDK_TARGET_CPU="sandybridge"
        fi
  
 -      if [ "$(rustc --version --verbose | grep "host:")" = "host: x86_64-apple-darwin" ] || [ "$(rustc --version --verbose | grep "host:")" = "host: aarch64-apple-darwin" ]; then
 -              # OSX sed is for some reason not compatible with GNU sed
 -              sed -i '' "s/^    <version>.*<\/version>/    <version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml
 -      else
 +      if is_gnu_sed; then
                sed -i "s/^    <version>.*<\/version>/    <version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml
 +      else
 +        # OSX sed is for some reason not compatible with GNU sed
 +              sed -i '' "s/^    <version>.*<\/version>/    <version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml
        fi
  
        echo "Creating Java bindings..."
@@@ -237,9 -233,9 +237,9 @@@ els
                        NODE_V="$(node --version)"
                        if [ "${NODE_V:1:2}" -gt 14 ]; then
                                cd ../ts
-                               node test/node.mjs
+                               node --stack_trace_limit=200 --trace-uncaught test/node.mjs
                                cd ../node-net
-                               node test/test.mjs
+                               node --stack_trace_limit=200 --trace-uncaught test/test.mjs
                        fi
                fi
        fi