Skip to content

Commit 17c1e0d

Browse files
committed
Merge remote-tracking branch 'myfork/merged-master' into merged-master-ci
2 parents dc51ca8 + 5485fde commit 17c1e0d

15 files changed

Lines changed: 62 additions & 56 deletions

ci/test/03_test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ if [ "$RUN_UNIT_TESTS" = "true" ]; then
182182
fi
183183

184184
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
185-
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite
185+
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_elements --catch_system_errors=no -l test_suite
186186
fi
187187

188188
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then

cmake/module/AddBoostIfNeeded.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function(add_boost_if_needed)
7171
include(CheckIncludeFileCXX)
7272
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
7373
if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H)
74-
message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.")
74+
message(FATAL_ERROR "Building test_elements executable requested but boost/test/included/unit_test.hpp header not available.")
7575
endif()
7676
endif()
7777

cmake/module/GenerateSetupNsi.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function(generate_setup_nsi)
1212
set(BITCOIN_CLI_NAME "elements-cli")
1313
set(BITCOIN_TX_NAME "elements-tx")
1414
set(BITCOIN_WALLET_TOOL_NAME "elements-wallet")
15-
set(BITCOIN_TEST_NAME "test_bitcoin")
15+
set(BITCOIN_TEST_NAME "test_elements")
1616
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
17-
configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY)
17+
configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY)
1818
endfunction()

cmake/module/Maintenance.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function(add_maintenance_targets)
2323
return()
2424
endif()
2525

26-
foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_bitcoin bench_bitcoin)
26+
foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_elements bench_bitcoin)
2727
if(TARGET ${target})
2828
list(APPEND executables $<TARGET_FILE:${target}>)
2929
endif()
@@ -43,7 +43,7 @@ function(add_maintenance_targets)
4343
endfunction()
4444

4545
function(add_windows_deploy_target)
46-
if(MINGW AND TARGET elements-qt AND TARGET elementsd AND TARGET elements-cli AND TARGET elements-tx AND TARGET elements-wallet AND TARGET elements-util AND TARGET test_bitcoin)
46+
if(MINGW AND TARGET elements-qt AND TARGET elementsd AND TARGET elements-cli AND TARGET elements-tx AND TARGET elements-wallet AND TARGET elements-util AND TARGET test_elements)
4747
# TODO: Consider replacing this code with the CPack NSIS Generator.
4848
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
4949
include(GenerateSetupNsi)
@@ -57,7 +57,7 @@ function(add_windows_deploy_target)
5757
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-tx>
5858
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-wallet>
5959
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-util>
60-
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
60+
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_elements> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_elements>
6161
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi
6262
VERBATIM
6363
)

cmake/script/Coverage.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ execute_process(
1919
COMMAND_ERROR_IS_FATAL ANY
2020
)
2121
execute_process(
22-
COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_bitcoin --output-file test_bitcoin.info
22+
COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_elements --output-file test_elements.info
2323
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
2424
COMMAND_ERROR_IS_FATAL ANY
2525
)
@@ -29,22 +29,22 @@ execute_process(
2929
COMMAND_ERROR_IS_FATAL ANY
3030
)
3131
execute_process(
32-
COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info
32+
COMMAND ${LCOV_FILTER_COMMAND} test_elements.info test_elements_filtered.info
3333
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
3434
COMMAND_ERROR_IS_FATAL ANY
3535
)
3636
execute_process(
37-
COMMAND ${LCOV_COMMAND} --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_filtered.info
37+
COMMAND ${LCOV_COMMAND} --add-tracefile test_elements_filtered.info --output-file test_elements_filtered.info
3838
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
3939
COMMAND_ERROR_IS_FATAL ANY
4040
)
4141
execute_process(
42-
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_coverage.info
42+
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_elements_filtered.info --output-file test_elements_coverage.info
4343
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
4444
COMMAND_ERROR_IS_FATAL ANY
4545
)
4646
execute_process(
47-
COMMAND ${GENHTML_COMMAND} test_bitcoin_coverage.info --output-directory test_bitcoin.coverage
47+
COMMAND ${GENHTML_COMMAND} test_elements_coverage.info --output-directory test_elements.coverage
4848
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
4949
COMMAND_ERROR_IS_FATAL ANY
5050
)
@@ -75,7 +75,7 @@ execute_process(
7575
COMMAND_ERROR_IS_FATAL ANY
7676
)
7777
execute_process(
78-
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info
78+
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_elements_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info
7979
COMMAND ${GREP_EXECUTABLE} "%"
8080
COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }"
8181
OUTPUT_FILE coverage_percent.txt

contrib/devtools/test_deterministic_coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ NON_DETERMINISTIC_TESTS=(
3434
"wallet_tests/wallet_disableprivkeys" # validation.cpp: if (signals.CallbacksPending() > 10)
3535
)
3636

37-
TEST_BITCOIN_BINARY="src/test/test_bitcoin"
37+
TEST_BITCOIN_BINARY="src/test/test_elements"
3838

3939
print_usage() {
4040
echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]"

contrib/guix/libexec/build.sh

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ mkdir -p "$DISTSRC"
258258
case "$HOST" in
259259
*mingw*)
260260
cmake --build build -j "$JOBS" -t deploy ${V:+--verbose}
261-
mv build/bitcoin-win64-setup.exe "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
261+
mv build/elements-win64-setup.exe "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
262262
;;
263263
esac
264264

@@ -368,7 +368,7 @@ mkdir -p "$DISTSRC"
368368
;;
369369
*darwin*)
370370
cmake --build build --target deploy ${V:+--verbose}
371-
mv build/dist/Bitcoin-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
371+
mv build/dist/Elements-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip"
372372
mkdir -p "unsigned-app-${HOST}"
373373
cp --target-directory="unsigned-app-${HOST}" \
374374
contrib/macdeploy/detached-sig-create.sh

contrib/valgrind.supp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# dependencies that cannot be fixed in-tree.
33
#
44
# Example use:
5-
# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin
5+
# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_elements
66
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
7-
# --show-leak-kinds=all build/bin/test_bitcoin
7+
# --show-leak-kinds=all build/bin/test_elements
88
#
99
# To create suppressions for found issues, use the --gen-suppressions=all option:
1010
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
1111
# --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \
12-
# --error-limit=no build/bin/test_bitcoin
12+
# --error-limit=no build/bin/test_elements
1313
#
1414
# Note that suppressions may depend on OS and/or library versions.
1515
# Tested on:

share/setup.nsi.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Unicode true
1616

1717
# MUI Symbol Definitions
1818
!define MUI_ICON "@abs_top_srcdir@/src/qt/res/icons/bitcoin.ico"
19-
!define MUI_WELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/share/pixmaps/nsis-wizard.bmp"
19+
!define MUI_WELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
2020
!define MUI_HEADERIMAGE
2121
!define MUI_HEADERIMAGE_RIGHT
2222
!define MUI_HEADERIMAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-header.bmp"
@@ -28,7 +28,7 @@ Unicode true
2828
!define MUI_FINISHPAGE_RUN "$WINDIR\explorer.exe"
2929
!define MUI_FINISHPAGE_RUN_PARAMETERS $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
3030
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
31-
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/share/pixmaps/nsis-wizard.bmp"
31+
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
3232
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
3333

3434
# Included files

src/CMakeLists.txt

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ add_subdirectory(univalue)
2424
#=============================
2525
message("")
2626
message("Configuring secp256k1 subtree...")
27+
set(SECP256K1_ENABLE_MODULE_GENERATOR ON CACHE BOOL "" FORCE)
28+
set(SECP256K1_ENABLE_MODULE_RANGEPROOF ON CACHE BOOL "" FORCE)
29+
set(SECP256K1_ENABLE_MODULE_SURJECTION ON CACHE BOOL "" FORCE)
30+
set(SECP256K1_ENABLE_MODULE_WHITELIST ON CACHE BOOL "" FORCE)
2731
set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "" FORCE)
2832
set(SECP256K1_ENABLE_MODULE_ECDH ON CACHE BOOL "" FORCE)
2933
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
@@ -165,7 +169,7 @@ add_library(bitcoin_consensus STATIC EXCLUDE_FROM_ALL
165169
uint256.cpp
166170
)
167171
target_link_libraries(bitcoin_consensus
168-
PRIVATE
172+
PUBLIC
169173
core_interface
170174
bitcoin_crypto
171175
elementssimplicity
@@ -238,7 +242,7 @@ add_library(bitcoin_common STATIC EXCLUDE_FROM_ALL
238242
script/solver.cpp
239243
)
240244
target_link_libraries(bitcoin_common
241-
PRIVATE
245+
PUBLIC
242246
core_interface
243247
bitcoin_consensus
244248
bitcoin_util
@@ -255,20 +259,21 @@ if(ENABLE_WALLET)
255259
add_subdirectory(wallet)
256260

257261
if(BUILD_WALLET_TOOL)
258-
add_executable(elements-wallet
259-
bitcoin-wallet.cpp
260-
init/bitcoin-wallet.cpp
261-
wallet/wallettool.cpp
262-
)
263-
add_windows_resources(elements-wallet bitcoin-wallet-res.rc)
264-
target_link_libraries(elements-wallet
265-
core_interface
266-
bitcoin_node
267-
bitcoin_wallet
268-
bitcoin_common
269-
)
270-
install_binary_component(elements-wallet HAS_MANPAGE)
271-
endif()
262+
add_executable(elements-wallet
263+
bitcoin-wallet.cpp
264+
init/bitcoin-wallet.cpp
265+
wallet/wallettool.cpp
266+
)
267+
add_windows_resources(elements-wallet bitcoin-wallet-res.rc)
268+
target_link_libraries(elements-wallet
269+
core_interface
270+
bitcoin_node
271+
bitcoin_wallet
272+
bitcoin_common
273+
secp256k1
274+
)
275+
install_binary_component(elements-wallet HAS_MANPAGE)
276+
endif()
272277
endif()
273278

274279

@@ -375,7 +380,7 @@ add_library(bitcoin_node STATIC EXCLUDE_FROM_ALL
375380
$<$<NOT:$<TARGET_EXISTS:bitcoin_wallet>>:dummywallet.cpp>
376381
)
377382
target_link_libraries(bitcoin_node
378-
PRIVATE
383+
PUBLIC
379384
core_interface
380385
bitcoin_common
381386
bitcoin_util
@@ -390,6 +395,7 @@ target_link_libraries(bitcoin_node
390395
$<TARGET_NAME_IF_EXISTS:libevent::extra>
391396
$<TARGET_NAME_IF_EXISTS:libevent::pthreads>
392397
$<TARGET_NAME_IF_EXISTS:USDT::headers>
398+
secp256k1
393399
)
394400

395401

@@ -404,6 +410,7 @@ if(BUILD_DAEMON)
404410
core_interface
405411
bitcoin_node
406412
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
413+
secp256k1
407414
)
408415
install_binary_component(elementsd HAS_MANPAGE)
409416
endif()
@@ -417,6 +424,7 @@ if(WITH_MULTIPROCESS AND BUILD_DAEMON)
417424
bitcoin_node
418425
bitcoin_ipc
419426
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
427+
secp256k1
420428
)
421429
install_binary_component(elements-node)
422430
endif()

0 commit comments

Comments
 (0)