From 7527423381aee23ad044f87a4461a9e90c0cfeb9 Mon Sep 17 00:00:00 2001 From: gogoex <110195520+gogoex@users.noreply.github.com> Date: Tue, 22 Oct 2024 05:01:29 +0900 Subject: [PATCH 1/2] add missing objects and compiler flags for libblsct build --- src/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9fb4d3c97b5b0..70c4b5c896a78 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1447,9 +1447,11 @@ libblsct_a_SOURCES = \ crypto/sha256_sse41.cpp \ crypto/sha256_x86_shani.cpp \ crypto/sha256.cpp \ + hash.cpp \ primitives/transaction.cpp \ rpc/util.cpp \ script/interpreter.cpp \ + script/miniscript.cpp \ script/script.cpp \ script/sign.cpp \ script/signingprovider.cpp \ @@ -1458,6 +1460,7 @@ libblsct_a_SOURCES = \ uint256.cpp \ util/rbf.cpp \ util/strencodings.cpp \ + util/time.cpp \ wallet/coincontrol.cpp \ wallet/context.cpp \ wallet/crypter.cpp \ @@ -1491,8 +1494,9 @@ LIBUNIVALUE_BLSCT = libunivalue_blsct.a noinst_LIBRARIES += $(LIBUNIVALUE_BLSCT) libunivalue_blsct_a_SOURCES = $(UNIVALUE_LIB_SOURCES_INT) $(UNIVALUE_DIST_HEADERS_INT) $(UNIVALUE_LIB_HEADERS_INT) $(UNIVALUE_TEST_FILES_INT) libunivalue_blsct_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) +libunivalue_blsct_a_CXXFLAGS = $(AM_CXXFLAGS) -fPIC -libblsct_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +libblsct_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -fPIC libblsct_a_CPPFLAGS = $(AM_CPPFLAGS) $(BLS_INCLUDES) $(BOOST_CPPFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) if ENABLE_SSE41 From a20bf9bb53e222ebb31e994385f9e004d0c3c674 Mon Sep 17 00:00:00 2001 From: gogoex <110195520+gogoex@users.noreply.github.com> Date: Wed, 23 Oct 2024 06:44:01 +0900 Subject: [PATCH 2/2] fix deserialize_tx bug --- src/blsct/external_api/blsct.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blsct/external_api/blsct.cpp b/src/blsct/external_api/blsct.cpp index be8624a5bc9de..ab08097571d0f 100644 --- a/src/blsct/external_api/blsct.cpp +++ b/src/blsct/external_api/blsct.cpp @@ -750,6 +750,9 @@ CMutableTransaction* deserialize_tx( CMutableTransaction* tx = static_cast( malloc(sizeof(CMutableTransaction)) ); + CMutableTransaction empty_tx; + std::memcpy(tx, &empty_tx, sizeof(CMutableTransaction)); + DataStream st{}; TransactionSerParams params { .allow_witness = true }; ParamsStream ps {params, st};