Skip to content

Commit 97e8ca6

Browse files
committed
Merge branch 'auxpow'
2 parents 7959ab2 + 1e07205 commit 97e8ca6

File tree

191 files changed

+1365
-1133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+1365
-1133
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ jobs:
260260
env:
261261
BITCOIND: '${{ github.workspace }}\build\bin\Release\bitcoind.exe'
262262
BITCOINCLI: '${{ github.workspace }}\build\bin\Release\bitcoin-cli.exe'
263+
BITCOINTX: '${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe'
263264
BITCOINUTIL: '${{ github.workspace }}\build\bin\Release\bitcoin-util.exe'
264265
BITCOINWALLET: '${{ github.workspace }}\build\bin\Release\bitcoin-wallet.exe'
265266
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
@@ -389,16 +390,22 @@ jobs:
389390
(Get-Content "test/config.ini") -replace '(?<=^SRCDIR=).*', '${{ github.workspace }}' -replace '(?<=^BUILDDIR=).*', '${{ github.workspace }}' -replace '(?<=^RPCAUTH=).*', '${{ github.workspace }}/share/rpcauth/rpcauth.py' | Set-Content "test/config.ini"
390391
Get-Content "test/config.ini"
391392
392-
- name: Run util tests
393-
run: py -3 test/util/test_runner.py
394-
395393
- name: Run rpcauth test
396394
run: py -3 test/util/rpcauth-test.py
397395

396+
- name: Set previous release directory
397+
run: |
398+
echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> "$GITHUB_ENV"
399+
400+
- name: Get previous releases
401+
working-directory: test
402+
run: ./get_previous_releases.py --target-dir $PREVIOUS_RELEASES_DIR
403+
398404
- name: Run functional tests
399405
env:
400406
# TODO: Fix the excluded test and re-enable it.
401-
EXCLUDE: '--exclude wallet_multiwallet.py'
407+
# feature_unsupported_utxo_db.py fails on windows because of emojis in the test data directory
408+
EXCLUDE: '--exclude wallet_multiwallet.py,feature_unsupported_utxo_db.py'
402409
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
403410
run: py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix="$RUNNER_TEMP" --combinedlogslen=99999999 --timeout-factor=$TEST_RUNNER_TIMEOUT_FACTOR $EXCLUDE $TEST_RUNNER_EXTRA
404411

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,9 @@ set(Python3_FIND_FRAMEWORK LAST CACHE STRING "")
590590
set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "")
591591
mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES)
592592
find_package(Python3 3.10 COMPONENTS Interpreter)
593-
if(Python3_EXECUTABLE)
594-
set(PYTHON_COMMAND ${Python3_EXECUTABLE})
595-
else()
593+
if(NOT TARGET Python3::Interpreter)
596594
list(APPEND configure_warnings
597-
"Minimum required Python not found. Utils and rpcauth tests are disabled."
595+
"Minimum required Python not found. Rpcauth tests are disabled."
598596
)
599597
endif()
600598

ci/test/00_setup_env_i686_multiprocess.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export CI_IMAGE_PLATFORM="linux/amd64"
1313
export PACKAGES="llvm clang g++-multilib"
1414
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
1515
export GOAL="install"
16-
export TEST_RUNNER_EXTRA="--v2transport"
16+
export TEST_RUNNER_EXTRA="--v2transport --usecli"
1717
export BITCOIN_CONFIG="\
1818
-DCMAKE_BUILD_TYPE=Debug \
1919
-DCMAKE_C_COMPILER='clang;-m32' \

ci/test/03_test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if [ -z "$NO_DEPENDS" ]; then
9999
bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1"
100100
fi
101101
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
102-
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
102+
test/get_previous_releases.py --target-dir "$PREVIOUS_RELEASES_DIR"
103103
fi
104104

105105
BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON"

cmake/module/AddBoostIfNeeded.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ function(add_boost_if_needed)
3131

3232
find_package(Boost 1.73.0 REQUIRED CONFIG)
3333
mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR)
34+
# Workaround for a bug in NetBSD pkgsrc.
35+
# See: https://github.com/NetBSD/pkgsrc/issues/167.
36+
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
37+
get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE)
38+
set_target_properties(Boost::headers PROPERTIES
39+
INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir}
40+
)
41+
unset(_boost_include_dir)
42+
endif()
3443
set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)
3544
target_compile_definitions(Boost::headers INTERFACE
3645
# We don't use multi_index serialization.

cmake/module/Maintenance.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function(setup_split_debug_script)
1919
endfunction()
2020

2121
function(add_maintenance_targets)
22-
if(NOT PYTHON_COMMAND)
22+
if(NOT TARGET Python3::Interpreter)
2323
return()
2424
endif()
2525

@@ -31,13 +31,13 @@ function(add_maintenance_targets)
3131

3232
add_custom_target(check-symbols
3333
COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..."
34-
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
34+
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables}
3535
VERBATIM
3636
)
3737

3838
add_custom_target(check-security
3939
COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
40-
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
40+
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables}
4141
VERBATIM
4242
)
4343
endfunction()
@@ -100,7 +100,7 @@ function(add_macos_deploy_target)
100100
if(CMAKE_HOST_APPLE)
101101
add_custom_command(
102102
OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip
103-
COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
103+
COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
104104
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
105105
VERBATIM
106106
)
@@ -113,7 +113,7 @@ function(add_macos_deploy_target)
113113
else()
114114
add_custom_command(
115115
OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt
116-
COMMAND OBJDUMP=${CMAKE_OBJDUMP} ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
116+
COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $<TARGET_FILE:Python3::Interpreter> ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR}
117117
DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
118118
VERBATIM
119119
)

cmake/tests.cmake

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or https://opensource.org/license/mit/.
44

5-
if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
6-
add_test(NAME util_test_runner
7-
COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
8-
)
9-
endif()
10-
11-
if(PYTHON_COMMAND)
12-
add_test(NAME util_rpcauth_test
13-
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
14-
)
15-
endif()
5+
add_test(NAME util_rpcauth_test
6+
COMMAND Python3::Interpreter ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
7+
)
8+
set_tests_properties(util_rpcauth_test PROPERTIES
9+
DISABLED $<NOT:$<TARGET_EXISTS:Python3::Interpreter>>
10+
)

contrib/tracing/p2p_monitor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def loop(screen, bpf, peers):
179179
info_panel = panel.new_panel(win)
180180
info_panel.hide()
181181

182-
ROWS_AVALIABLE_FOR_LIST = curses.LINES - 5
182+
ROWS_AVAILABLE_FOR_LIST = curses.LINES - 5
183183
scroll = 0
184184

185185
while True:
@@ -191,7 +191,7 @@ def loop(screen, bpf, peers):
191191
if (ch == curses.KEY_DOWN or ch == ord("j")) and cur_list_pos < len(
192192
peers.keys()) -1 and info_panel.hidden():
193193
cur_list_pos += 1
194-
if cur_list_pos >= ROWS_AVALIABLE_FOR_LIST:
194+
if cur_list_pos >= ROWS_AVAILABLE_FOR_LIST:
195195
scroll += 1
196196
if (ch == curses.KEY_UP or ch == ord("k")) and cur_list_pos > 0 and info_panel.hidden():
197197
cur_list_pos -= 1
@@ -203,14 +203,14 @@ def loop(screen, bpf, peers):
203203
else:
204204
info_panel.hide()
205205
screen.erase()
206-
render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel)
206+
render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel)
207207
curses.panel.update_panels()
208208
screen.refresh()
209209
except KeyboardInterrupt:
210210
exit()
211211

212212

213-
def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel):
213+
def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel):
214214
""" renders the list of peers and details panel
215215
216216
This code is unrelated to USDT, BCC and BPF.
@@ -223,7 +223,7 @@ def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_pa
223223
1, 0, (" Navigate with UP/DOWN or J/K and select a peer with ENTER or SPACE to see individual P2P messages"), curses.A_NORMAL)
224224
screen.addstr(3, 0,
225225
header_format % ("PEER", "OUTBOUND", "INBOUND", "TYPE", "ADDR"), curses.A_BOLD | curses.A_UNDERLINE)
226-
peer_list = sorted(peers.keys())[scroll:ROWS_AVALIABLE_FOR_LIST+scroll]
226+
peer_list = sorted(peers.keys())[scroll:ROWS_AVAILABLE_FOR_LIST+scroll]
227227
for i, peer_id in enumerate(peer_list):
228228
peer = peers[peer_id]
229229
screen.addstr(i + 4, 0,

depends/builders/freebsd.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ build_freebsd_CXX=clang++
33

44
build_freebsd_SHA256SUM = sha256sum
55
build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
6+
7+
# freebsd host on freebsd builder: override freebsd host preferences.
8+
freebsd_CC = clang
9+
freebsd_CXX = clang++

depends/builders/openbsd.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CON
77
build_openbsd_TAR = gtar
88
# openBSD touch doesn't understand -h
99
build_openbsd_TOUCH = touch -m -t 200001011200
10+
11+
# openbsd host on openbsd builder: override openbsd host preferences.
12+
openbsd_CC = clang
13+
openbsd_CXX = clang++

0 commit comments

Comments
 (0)