mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Compare commits
54 Commits
b5de5b3fab
...
20c65f5d69
Author | SHA1 | Date | |
---|---|---|---|
|
20c65f5d69 | ||
|
7530f3d245 | ||
|
5bf0409eba | ||
|
a9cfd39390 | ||
|
0968a0023b | ||
|
04ce1fea52 | ||
|
16c2e13fb4 | ||
|
a1b256b06f | ||
|
c6dd3dd567 | ||
|
ff29c62103 | ||
|
3d5dc160d8 | ||
|
032fc21198 | ||
|
05ca6cffff | ||
|
27d9763b1b | ||
|
26cc5a1c90 | ||
|
d0131a5259 | ||
|
4f1b5c165b | ||
|
a49162ffae | ||
|
8dd0db7de9 | ||
|
187fe17650 | ||
|
eef863554a | ||
|
e7702292d1 | ||
|
b7099eed47 | ||
|
64cdc42130 | ||
|
440fd3fe21 | ||
|
2ab561d281 | ||
|
280988bee3 | ||
|
a497df0339 | ||
|
db676a7e5f | ||
|
94e6637c33 | ||
|
bbb0cceb7a | ||
|
3f143096c8 | ||
|
000495df8e | ||
|
714ea55dbe | ||
|
11323c3851 | ||
|
548121d366 | ||
|
b65038ec94 | ||
|
f3b065cd9c | ||
|
feb6a1ad3f | ||
|
2e509b96c4 | ||
|
f0decc8790 | ||
|
865b24ea00 | ||
|
1f5fa7e7cf | ||
|
59ddac5656 | ||
|
05732aceaf | ||
|
3931608858 | ||
|
f147373a32 | ||
|
2a2a2693d0 | ||
|
11eeae2ab9 | ||
|
f16265dd50 | ||
|
b212ca0515 | ||
|
66e77f7879 | ||
|
995cae46af | ||
|
61a0140362 |
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -114,22 +114,22 @@ jobs:
|
|||||||
- build_target: linux64
|
- build_target: linux64
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
- build_target: linux64_tsan
|
- build_target: linux64_cxx20
|
||||||
host: x86_64-pc-linux-gnu
|
|
||||||
depends_on: linux64
|
|
||||||
- build_target: linux64_ubsan
|
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
- build_target: linux64_fuzz
|
- build_target: linux64_fuzz
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
- build_target: linux64_cxx20
|
- build_target: linux64_nowallet
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
- build_target: linux64_sqlite
|
- build_target: linux64_sqlite
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
- build_target: linux64_nowallet
|
- build_target: linux64_tsan
|
||||||
|
host: x86_64-pc-linux-gnu
|
||||||
|
depends_on: linux64
|
||||||
|
- build_target: linux64_ubsan
|
||||||
host: x86_64-pc-linux-gnu
|
host: x86_64-pc-linux-gnu
|
||||||
depends_on: linux64
|
depends_on: linux64
|
||||||
container:
|
container:
|
||||||
|
@ -40,26 +40,11 @@ builder-image:
|
|||||||
needs:
|
needs:
|
||||||
- builder-image
|
- builder-image
|
||||||
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
|
image: $CI_REGISTRY_IMAGE:builder-$CI_COMMIT_REF_SLUG
|
||||||
variables:
|
|
||||||
SDK_URL: https://bitcoincore.org/depends-sources/sdks
|
|
||||||
XCODE_VERSION: "15.0"
|
|
||||||
XCODE_BUILD_ID: 15A240d
|
|
||||||
before_script:
|
before_script:
|
||||||
- echo HOST=$HOST
|
|
||||||
- |
|
- |
|
||||||
if [ "$HOST" = "x86_64-apple-darwin" ]; then
|
echo HOST=${HOST}
|
||||||
mkdir -p depends/SDKs
|
if [[ "${HOST}" == "x86_64-apple-darwin" ]]; then
|
||||||
mkdir -p depends/sdk-sources
|
./contrib/containers/guix/scripts/setup-sdk
|
||||||
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
|
|
||||||
OSX_SDK_PATH="depends/sdk-sources/${OSX_SDK_BASENAME}"
|
|
||||||
if [ ! -f "$OSX_SDK_PATH" ]; then
|
|
||||||
echo "Downloading MacOS SDK"
|
|
||||||
curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
|
|
||||||
fi
|
|
||||||
if [ -f "$OSX_SDK_PATH" ]; then
|
|
||||||
echo "Extracting MacOS SDK"
|
|
||||||
tar -C depends/SDKs -xf "$OSX_SDK_PATH"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- make -j$(nproc) -C depends HOST=$HOST $DEP_OPTS
|
- make -j$(nproc) -C depends HOST=$HOST $DEP_OPTS
|
||||||
@ -193,13 +178,13 @@ x86_64-w64-mingw32:
|
|||||||
variables:
|
variables:
|
||||||
HOST: x86_64-w64-mingw32
|
HOST: x86_64-w64-mingw32
|
||||||
|
|
||||||
x86_64-pc-linux-gnu-debug:
|
x86_64-pc-linux-gnu_debug:
|
||||||
extends: .build-depends-template
|
extends: .build-depends-template
|
||||||
variables:
|
variables:
|
||||||
HOST: x86_64-pc-linux-gnu
|
HOST: x86_64-pc-linux-gnu
|
||||||
DEP_OPTS: "DEBUG=1"
|
DEP_OPTS: "DEBUG=1"
|
||||||
|
|
||||||
x86_64-pc-linux-gnu-nowallet:
|
x86_64-pc-linux-gnu_nowallet:
|
||||||
extends:
|
extends:
|
||||||
- .build-depends-template
|
- .build-depends-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
@ -207,13 +192,13 @@ x86_64-pc-linux-gnu-nowallet:
|
|||||||
HOST: x86_64-pc-linux-gnu
|
HOST: x86_64-pc-linux-gnu
|
||||||
DEP_OPTS: "NO_WALLET=1"
|
DEP_OPTS: "NO_WALLET=1"
|
||||||
|
|
||||||
x86_64-pc-linux-gnu-multiprocess:
|
x86_64-pc-linux-gnu_multiprocess:
|
||||||
extends:
|
extends:
|
||||||
- .build-depends-template
|
- .build-depends-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
variables:
|
variables:
|
||||||
HOST: x86_64-pc-linux-gnu
|
HOST: x86_64-pc-linux-gnu
|
||||||
DEP_OPTS: "MULTIPROCESS=1"
|
DEP_OPTS: "DEBUG=1 MULTIPROCESS=1"
|
||||||
|
|
||||||
x86_64-apple-darwin:
|
x86_64-apple-darwin:
|
||||||
extends:
|
extends:
|
||||||
@ -243,7 +228,7 @@ win64-build:
|
|||||||
linux64-build:
|
linux64-build:
|
||||||
extends: .build-template
|
extends: .build-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64
|
BUILD_TARGET: linux64
|
||||||
|
|
||||||
@ -252,7 +237,7 @@ linux64_cxx20-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_cxx20
|
BUILD_TARGET: linux64_cxx20
|
||||||
|
|
||||||
@ -261,7 +246,7 @@ linux64_sqlite-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_sqlite
|
BUILD_TARGET: linux64_sqlite
|
||||||
|
|
||||||
@ -270,7 +255,7 @@ linux64_fuzz-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_fuzz
|
BUILD_TARGET: linux64_fuzz
|
||||||
|
|
||||||
@ -279,7 +264,7 @@ linux64_fuzz-build:
|
|||||||
# - .build-template
|
# - .build-template
|
||||||
# - .skip-in-fast-mode-template
|
# - .skip-in-fast-mode-template
|
||||||
# needs:
|
# needs:
|
||||||
# - x86_64-pc-linux-gnu-debug
|
# - x86_64-pc-linux-gnu_debug
|
||||||
# variables:
|
# variables:
|
||||||
# BUILD_TARGET: linux64_asan
|
# BUILD_TARGET: linux64_asan
|
||||||
|
|
||||||
@ -288,7 +273,7 @@ linux64_tsan-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_tsan
|
BUILD_TARGET: linux64_tsan
|
||||||
|
|
||||||
@ -297,7 +282,7 @@ linux64_ubsan-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-debug
|
- x86_64-pc-linux-gnu_debug
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_ubsan
|
BUILD_TARGET: linux64_ubsan
|
||||||
|
|
||||||
@ -306,7 +291,7 @@ linux64_nowallet-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-nowallet
|
- x86_64-pc-linux-gnu_nowallet
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_nowallet
|
BUILD_TARGET: linux64_nowallet
|
||||||
|
|
||||||
@ -315,7 +300,7 @@ linux64_multiprocess-build:
|
|||||||
- .build-template
|
- .build-template
|
||||||
- .skip-in-fast-mode-template
|
- .skip-in-fast-mode-template
|
||||||
needs:
|
needs:
|
||||||
- x86_64-pc-linux-gnu-multiprocess
|
- x86_64-pc-linux-gnu_multiprocess
|
||||||
variables:
|
variables:
|
||||||
BUILD_TARGET: linux64_multiprocess
|
BUILD_TARGET: linux64_multiprocess
|
||||||
|
|
||||||
@ -324,7 +309,7 @@ linux64_multiprocess-build:
|
|||||||
# - .build-template
|
# - .build-template
|
||||||
# - .skip-in-fast-mode-template
|
# - .skip-in-fast-mode-template
|
||||||
# needs:
|
# needs:
|
||||||
# - x86_64-pc-linux-gnu-debug
|
# - x86_64-pc-linux-gnu_debug
|
||||||
# variables:
|
# variables:
|
||||||
# BUILD_TARGET: linux64_valgrind
|
# BUILD_TARGET: linux64_valgrind
|
||||||
|
|
||||||
|
@ -116,8 +116,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
TEMP_CPPFLAGS=$CPPFLAGS
|
TEMP_CPPFLAGS=$CPPFLAGS
|
||||||
TEMP_CXXFLAGS=$CXXFLAGS
|
TEMP_CXXFLAGS=$CXXFLAGS
|
||||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
|
||||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||||
_BITCOIN_QT_IS_STATIC
|
_BITCOIN_QT_IS_STATIC
|
||||||
if test "x$bitcoin_cv_static_qt" = xyes; then
|
if test "x$bitcoin_cv_static_qt" = xyes; then
|
||||||
_BITCOIN_QT_CHECK_STATIC_LIBS
|
_BITCOIN_QT_CHECK_STATIC_LIBS
|
||||||
@ -177,8 +177,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
|
AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
|
||||||
TEMP_CPPFLAGS=$CPPFLAGS
|
TEMP_CPPFLAGS=$CPPFLAGS
|
||||||
TEMP_CXXFLAGS=$CXXFLAGS
|
TEMP_CXXFLAGS=$CXXFLAGS
|
||||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
|
||||||
CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
|
CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <QtCore/qconfig.h>
|
#include <QtCore/qconfig.h>
|
||||||
#ifndef QT_VERSION
|
#ifndef QT_VERSION
|
||||||
@ -200,7 +200,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
|
AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
|
||||||
TEMP_CPPFLAGS=$CPPFLAGS
|
TEMP_CPPFLAGS=$CPPFLAGS
|
||||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <QtCore/qconfig.h>
|
#include <QtCore/qconfig.h>
|
||||||
#ifndef QT_VERSION
|
#ifndef QT_VERSION
|
||||||
|
@ -20,17 +20,8 @@ mkdir -p $CACHE_DIR/sdk-sources
|
|||||||
ln -s $CACHE_DIR/depends ${DEPENDS_DIR}/built
|
ln -s $CACHE_DIR/depends ${DEPENDS_DIR}/built
|
||||||
ln -s $CACHE_DIR/sdk-sources ${DEPENDS_DIR}/sdk-sources
|
ln -s $CACHE_DIR/sdk-sources ${DEPENDS_DIR}/sdk-sources
|
||||||
|
|
||||||
mkdir -p ${DEPENDS_DIR}/SDKs
|
if [[ "${HOST}" == "x86_64-apple-darwin" ]]; then
|
||||||
|
./contrib/containers/guix/scripts/setup-sdk
|
||||||
if [ -n "$XCODE_VERSION" ]; then
|
|
||||||
OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz"
|
|
||||||
OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_BASENAME}"
|
|
||||||
if [ ! -f "$OSX_SDK_PATH" ]; then
|
|
||||||
curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
|
|
||||||
fi
|
|
||||||
if [ -f "$OSX_SDK_PATH" ]; then
|
|
||||||
tar -C ${DEPENDS_DIR}/SDKs -xf "$OSX_SDK_PATH"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
|
make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
|
||||||
|
@ -18,28 +18,30 @@ export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/
|
|||||||
|
|
||||||
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
||||||
source ./ci/test/00_setup_env_arm.sh
|
source ./ci/test/00_setup_env_arm.sh
|
||||||
elif [ "$BUILD_TARGET" = "win64" ]; then
|
|
||||||
source ./ci/test/00_setup_env_win64.sh
|
|
||||||
elif [ "$BUILD_TARGET" = "linux64" ]; then
|
elif [ "$BUILD_TARGET" = "linux64" ]; then
|
||||||
source ./ci/test/00_setup_env_native_qt5.sh
|
source ./ci/test/00_setup_env_native_qt5.sh
|
||||||
elif [ "$BUILD_TARGET" = "linux64_asan" ]; then
|
elif [ "$BUILD_TARGET" = "linux64_asan" ]; then
|
||||||
source ./ci/test/00_setup_env_native_asan.sh
|
source ./ci/test/00_setup_env_native_asan.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then
|
||||||
|
source ./ci/test/00_setup_env_native_cxx20.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then
|
||||||
|
source ./ci/test/00_setup_env_native_fuzz.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "linux64_multiprocess" ]; then
|
||||||
|
source ./ci/test/00_setup_env_native_multiprocess.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
|
||||||
|
source ./ci/test/00_setup_env_native_nowallet.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then
|
||||||
|
source ./ci/test/00_setup_env_native_sqlite.sh
|
||||||
elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
|
elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
|
||||||
source ./ci/test/00_setup_env_native_tsan.sh
|
source ./ci/test/00_setup_env_native_tsan.sh
|
||||||
elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then
|
elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then
|
||||||
source ./ci/test/00_setup_env_native_ubsan.sh
|
source ./ci/test/00_setup_env_native_ubsan.sh
|
||||||
elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then
|
|
||||||
source ./ci/test/00_setup_env_native_fuzz.sh
|
|
||||||
elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then
|
|
||||||
source ./ci/test/00_setup_env_native_cxx20.sh
|
|
||||||
elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then
|
|
||||||
source ./ci/test/00_setup_env_native_sqlite.sh
|
|
||||||
elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then
|
|
||||||
source ./ci/test/00_setup_env_native_nowallet.sh
|
|
||||||
elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then
|
elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then
|
||||||
source ./ci/test/00_setup_env_native_valgrind.sh
|
source ./ci/test/00_setup_env_native_valgrind.sh
|
||||||
elif [ "$BUILD_TARGET" = "mac" ]; then
|
elif [ "$BUILD_TARGET" = "mac" ]; then
|
||||||
source ./ci/test/00_setup_env_mac.sh
|
source ./ci/test/00_setup_env_mac.sh
|
||||||
elif [ "$BUILD_TARGET" = "s390x" ]; then
|
elif [ "$BUILD_TARGET" = "s390x" ]; then
|
||||||
source ./ci/test/00_setup_env_s390x.sh
|
source ./ci/test/00_setup_env_s390x.sh
|
||||||
|
elif [ "$BUILD_TARGET" = "win64" ]; then
|
||||||
|
source ./ci/test/00_setup_env_win64.sh
|
||||||
fi
|
fi
|
||||||
|
@ -42,7 +42,7 @@ echo "Using socketevents mode: $SOCKETEVENTS"
|
|||||||
EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
|
EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS
|
LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS $EXTRA_ARGS
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ if [ "$DIRECT_WINE_EXEC_TESTS" = "true" ]; then
|
|||||||
wine ./src/test/test_dash.exe
|
wine ./src/test/test_dash.exe
|
||||||
else
|
else
|
||||||
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
|
||||||
${TEST_RUNNER_ENV} ./src/test/test_dash --catch_system_errors=no -l test_suite
|
./src/test/test_dash --catch_system_errors=no -l test_suite
|
||||||
else
|
else
|
||||||
${TEST_RUNNER_ENV} make $MAKEJOBS check VERBOSE=1
|
make $MAKEJOBS check VERBOSE=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -25,8 +25,7 @@ export JOB_NUMBER=${JOB_NUMBER:-1}
|
|||||||
|
|
||||||
echo "Fallback to default values in env (if not yet set)"
|
echo "Fallback to default values in env (if not yet set)"
|
||||||
# The number of parallel jobs to pass down to make and test_runner.py
|
# The number of parallel jobs to pass down to make and test_runner.py
|
||||||
MAKEJOBS="-j$(nproc)"
|
export MAKEJOBS=${MAKEJOBS:--j$(nproc)}
|
||||||
export MAKEJOBS
|
|
||||||
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
||||||
# This folder only exists on the ci host.
|
# This folder only exists on the ci host.
|
||||||
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch}
|
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch}
|
||||||
@ -44,7 +43,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
|
|||||||
# This is needed because some ci machines have slow CPU or disk, so sanitizers
|
# This is needed because some ci machines have slow CPU or disk, so sanitizers
|
||||||
# might be slow or a reindex might be waiting on disk IO.
|
# might be slow or a reindex might be waiting on disk IO.
|
||||||
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
|
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
|
||||||
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
|
|
||||||
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
||||||
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
|
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
|
||||||
|
|
||||||
|
@ -11,5 +11,5 @@ export PACKAGES="cmake python3 llvm clang"
|
|||||||
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
|
||||||
export GOAL="install"
|
export GOAL="install"
|
||||||
export TEST_RUNNER_EXTRA="--v2transport"
|
export TEST_RUNNER_EXTRA="--v2transport"
|
||||||
export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang CXX=clang++" # Use clang to avoid OOM
|
export BITCOIN_CONFIG="--with-boost-process --enable-debug CC=clang-16 CXX=clang++-16" # Use clang to avoid OOM
|
||||||
export TEST_RUNNER_ENV="BITCOIND=dash-node"
|
export BITCOIND=dash-node # Used in functional tests
|
||||||
|
@ -9,8 +9,7 @@ export LC_ALL=C.UTF-8
|
|||||||
export CONTAINER_NAME=ci_native_qt5
|
export CONTAINER_NAME=ci_native_qt5
|
||||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
||||||
# TODO: we have few rpcs that aren't covered by any test, re-enable the line below once it's fixed
|
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||||
# export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
|
||||||
export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
export RUN_UNIT_TESTS_SEQUENTIAL="true"
|
||||||
export RUN_UNIT_TESTS="false"
|
export RUN_UNIT_TESTS="false"
|
||||||
export GOAL="install"
|
export GOAL="install"
|
||||||
|
@ -19,7 +19,6 @@ fi
|
|||||||
# Use debian to avoid 404 apt errors
|
# Use debian to avoid 404 apt errors
|
||||||
export CONTAINER_NAME=ci_s390x
|
export CONTAINER_NAME=ci_s390x
|
||||||
export RUN_UNIT_TESTS=true
|
export RUN_UNIT_TESTS=true
|
||||||
export TEST_RUNNER_ENV="LC_ALL=C"
|
|
||||||
export RUN_FUNCTIONAL_TESTS=true
|
export RUN_FUNCTIONAL_TESTS=true
|
||||||
export GOAL="install"
|
export GOAL="install"
|
||||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --with-boost-process" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
|
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --with-boost-process" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
|
||||||
|
82
configure.ac
82
configure.ac
@ -372,7 +372,9 @@ case $host in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if test "x$enable_debug" = xyes; then
|
if test "x$enable_debug" = xyes; then
|
||||||
dnl Clear default -g -O2 flags
|
dnl If debugging is enabled, and the user hasn't overriden CXXFLAGS, clear
|
||||||
|
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
|
||||||
|
dnl with "-O0 -g3 -g -O2".
|
||||||
if test "x$CXXFLAGS_overridden" = xno; then
|
if test "x$CXXFLAGS_overridden" = xno; then
|
||||||
CXXFLAGS=""
|
CXXFLAGS=""
|
||||||
fi
|
fi
|
||||||
@ -397,11 +399,11 @@ else
|
|||||||
# Stacktraces will be suboptimal due to optimization, but better than nothing. Also, -fno-omit-frame-pointer
|
# Stacktraces will be suboptimal due to optimization, but better than nothing. Also, -fno-omit-frame-pointer
|
||||||
# mitigates this a little bit
|
# mitigates this a little bit
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
CFLAGS="$CFLAGS -g1 -fno-omit-frame-pointer"
|
DEBUG_CFLAGS="$DEBUG_CFLAGS -g1 -fno-omit-frame-pointer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$GXX" = xyes; then
|
if test "x$GXX" = xyes; then
|
||||||
CXXFLAGS="$CXXFLAGS -g1 -fno-omit-frame-pointer"
|
DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g1 -fno-omit-frame-pointer"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -429,7 +431,7 @@ if test x$LINK_WRAP_SUPPORTED = "xyes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Needed for MinGW targets when debug symbols are enabled as compiled objects get very large
|
# Needed for MinGW targets when debug symbols are enabled as compiled objects get very large
|
||||||
AX_CHECK_COMPILE_FLAG([-Wa,-mbig-obj], [CXXFLAGS="$CXXFLAGS -Wa,-mbig-obj"],,,)
|
AX_CHECK_COMPILE_FLAG([-Wa,-mbig-obj], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -Wa,-mbig-obj"],,,)
|
||||||
|
|
||||||
if test x$use_sanitizers != x; then
|
if test x$use_sanitizers != x; then
|
||||||
dnl First check if the compiler accepts flags. If an incompatible pair like
|
dnl First check if the compiler accepts flags. If an incompatible pair like
|
||||||
@ -532,7 +534,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
|
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
|
||||||
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers],[[CXXFLAGS="$CXXFLAGS -fno-extended-identifiers"]],,[[$CXXFLAG_WERROR]])
|
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers],[[CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"]],,[[$CXXFLAG_WERROR]])
|
||||||
|
|
||||||
enable_arm_crc=no
|
enable_arm_crc=no
|
||||||
enable_arm_shani=no
|
enable_arm_shani=no
|
||||||
@ -683,7 +685,7 @@ CXXFLAGS="$TEMP_CXXFLAGS"
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -DGSL_NO_IOSTREAMS"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO -DGSL_NO_IOSTREAMS"
|
||||||
|
|
||||||
AC_ARG_WITH([utils],
|
AC_ARG_WITH([utils],
|
||||||
[AS_HELP_STRING([--with-utils],
|
[AS_HELP_STRING([--with-utils],
|
||||||
@ -755,7 +757,10 @@ case $host in
|
|||||||
AC_MSG_ERROR("windres not found")
|
AC_MSG_ERROR("windres not found")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
|
||||||
|
dnl Prevent the definition of min/max macros.
|
||||||
|
dnl We always want to use the standard library.
|
||||||
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX"
|
||||||
|
|
||||||
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
|
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
|
||||||
dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
|
dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
|
||||||
@ -766,14 +771,14 @@ case $host in
|
|||||||
postdeps_CXX=
|
postdeps_CXX=
|
||||||
|
|
||||||
dnl We require Windows 7 (NT 6.1) or later
|
dnl We require Windows 7 (NT 6.1) or later
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1]],[LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"],,[[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1]],[CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"],,[[$LDFLAG_WERROR]])
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
TARGET_OS=darwin
|
TARGET_OS=darwin
|
||||||
if test x$cross_compiling != xyes; then
|
if test x$cross_compiling != xyes; then
|
||||||
BUILD_OS=darwin
|
BUILD_OS=darwin
|
||||||
|
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]])
|
||||||
|
|
||||||
AC_CHECK_PROG([BREW],brew, brew)
|
AC_CHECK_PROG([BREW],brew, brew)
|
||||||
if test x$BREW = xbrew; then
|
if test x$BREW = xbrew; then
|
||||||
@ -800,8 +805,8 @@ case $host in
|
|||||||
|
|
||||||
gmp_prefix=$($BREW --prefix gmp 2>/dev/null)
|
gmp_prefix=$($BREW --prefix gmp 2>/dev/null)
|
||||||
if test x$gmp_prefix != x; then
|
if test x$gmp_prefix != x; then
|
||||||
CPPFLAGS="$CPPFLAGS -I$gmp_prefix/include"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -I$gmp_prefix/include"
|
||||||
LDFLAGS="$LDFLAGS -L$gmp_prefix/lib"
|
CORE_LDFLAGS="$CORE_LDFLAGS -L$gmp_prefix/lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host in
|
case $host in
|
||||||
@ -813,20 +818,20 @@ case $host in
|
|||||||
if test "x$use_upnp" != xno && $BREW list --versions miniupnpc >/dev/null; then
|
if test "x$use_upnp" != xno && $BREW list --versions miniupnpc >/dev/null; then
|
||||||
miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null)
|
miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null)
|
||||||
if test "x$suppress_external_warnings" != xno; then
|
if test "x$suppress_external_warnings" != xno; then
|
||||||
CPPFLAGS="$CPPFLAGS -isystem $miniupnpc_prefix/include"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -isystem $miniupnpc_prefix/include"
|
||||||
else
|
else
|
||||||
CPPFLAGS="$CPPFLAGS -I$miniupnpc_prefix/include"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -I$miniupnpc_prefix/include"
|
||||||
fi
|
fi
|
||||||
LDFLAGS="$LDFLAGS -L$miniupnpc_prefix/lib"
|
CORE_LDFLAGS="$CORE_LDFLAGS -L$miniupnpc_prefix/lib"
|
||||||
fi
|
fi
|
||||||
if test "x$use_natpmp" != xno && $BREW list --versions libnatpmp >/dev/null; then
|
if test "x$use_natpmp" != xno && $BREW list --versions libnatpmp >/dev/null; then
|
||||||
libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null)
|
libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null)
|
||||||
if test "x$suppress_external_warnings" != xno; then
|
if test "x$suppress_external_warnings" != xno; then
|
||||||
CPPFLAGS="$CPPFLAGS -isystem $libnatpmp_prefix/include"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -isystem $libnatpmp_prefix/include"
|
||||||
else
|
else
|
||||||
CPPFLAGS="$CPPFLAGS -I$libnatpmp_prefix/include"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -I$libnatpmp_prefix/include"
|
||||||
fi
|
fi
|
||||||
LDFLAGS="$LDFLAGS -L$libnatpmp_prefix/lib"
|
CORE_LDFLAGS="$CORE_LDFLAGS -L$libnatpmp_prefix/lib"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -849,7 +854,7 @@ case $host in
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
|
||||||
OBJCXXFLAGS="$CXXFLAGS"
|
OBJCXXFLAGS="$CXXFLAGS"
|
||||||
;;
|
;;
|
||||||
*android*)
|
*android*)
|
||||||
@ -912,11 +917,17 @@ if test x$use_lcov = xyes; then
|
|||||||
AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh")
|
AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh")
|
||||||
LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER"
|
LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER"
|
||||||
|
|
||||||
AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"],
|
AX_CHECK_LINK_FLAG([[--coverage]], [CORE_LDFLAGS="$CORE_LDFLAGS --coverage"],
|
||||||
[AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
|
[AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
|
||||||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
|
AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"],
|
||||||
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
|
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
|
||||||
CXXFLAGS="$CXXFLAGS -Og"
|
dnl If coverage is enabled, and the user hasn't overriden CXXFLAGS, clear
|
||||||
|
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
|
||||||
|
dnl with "--coverage -Og -O0 -g -O2".
|
||||||
|
if test "$CXXFLAGS_overridden" = "no"; then
|
||||||
|
CXXFLAGS=""
|
||||||
|
fi
|
||||||
|
CORE_CXXFLAGS="$CORE_CXXFLAGS -Og -O0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_lcov_branch != xno; then
|
if test x$use_lcov_branch != xno; then
|
||||||
@ -942,13 +953,13 @@ AC_FUNC_STRERROR_R
|
|||||||
if test x$ac_cv_sys_file_offset_bits != x &&
|
if test x$ac_cv_sys_file_offset_bits != x &&
|
||||||
test x$ac_cv_sys_file_offset_bits != xno &&
|
test x$ac_cv_sys_file_offset_bits != xno &&
|
||||||
test x$ac_cv_sys_file_offset_bits != xunknown; then
|
test x$ac_cv_sys_file_offset_bits != xunknown; then
|
||||||
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$ac_cv_sys_large_files != x &&
|
if test x$ac_cv_sys_large_files != x &&
|
||||||
test x$ac_cv_sys_large_files != xno &&
|
test x$ac_cv_sys_large_files != xno &&
|
||||||
test x$ac_cv_sys_large_files != xunknown; then
|
test x$ac_cv_sys_large_files != xunknown; then
|
||||||
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_gprof" = xyes; then
|
if test "x$enable_gprof" = xyes; then
|
||||||
@ -1037,8 +1048,8 @@ dnl These flags are specific to ld64, and may cause issues with other linkers.
|
|||||||
dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
|
dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
|
||||||
dnl "ad_strip" as the symbol for the entry point.
|
dnl "ad_strip" as the symbol for the entry point.
|
||||||
if test x$TARGET_OS = xdarwin; then
|
if test x$TARGET_OS = xdarwin; then
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,-fixup_chains]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,-fixup_chains]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [[$LDFLAG_WERROR]])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1048,7 +1059,6 @@ AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
|
|||||||
[#include <sys/types.h>
|
[#include <sys/types.h>
|
||||||
#include <ifaddrs.h>]
|
#include <ifaddrs.h>]
|
||||||
)
|
)
|
||||||
AC_CHECK_DECLS([strnlen])
|
|
||||||
|
|
||||||
dnl These are used for daemonization in dashd
|
dnl These are used for daemonization in dashd
|
||||||
AC_CHECK_DECLS([fork])
|
AC_CHECK_DECLS([fork])
|
||||||
@ -1361,7 +1371,7 @@ if test "x$enable_fuzz" = "xyes"; then
|
|||||||
[[-fsanitize=$use_sanitizers]],
|
[[-fsanitize=$use_sanitizers]],
|
||||||
[AC_MSG_RESULT([no])],
|
[AC_MSG_RESULT([no])],
|
||||||
[AC_MSG_RESULT([yes])
|
[AC_MSG_RESULT([yes])
|
||||||
CPPFLAGS="$CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"],
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"],
|
||||||
[],
|
[],
|
||||||
[AC_LANG_PROGRAM([[
|
[AC_LANG_PROGRAM([[
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -1385,7 +1395,7 @@ else
|
|||||||
QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES)
|
QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"
|
CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$enable_wallet != xno; then
|
if test x$enable_wallet != xno; then
|
||||||
@ -1518,7 +1528,7 @@ fi
|
|||||||
|
|
||||||
dnl Check for reduced exports
|
dnl Check for reduced exports
|
||||||
if test x$use_reduce_exports = xyes; then
|
if test x$use_reduce_exports = xyes; then
|
||||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"],
|
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
|
||||||
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]])
|
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]])
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]])
|
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]])
|
||||||
AX_CHECK_LINK_FLAG([-Wl,-no_exported_symbols], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -Wl,-no_exported_symbols"], [], [$LDFLAG_WERROR])
|
AX_CHECK_LINK_FLAG([-Wl,-no_exported_symbols], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -Wl,-no_exported_symbols"], [], [$LDFLAG_WERROR])
|
||||||
@ -1870,10 +1880,14 @@ AC_SUBST(BITCOIN_MP_NODE_NAME)
|
|||||||
AC_SUBST(BITCOIN_MP_GUI_NAME)
|
AC_SUBST(BITCOIN_MP_GUI_NAME)
|
||||||
|
|
||||||
AC_SUBST(RELDFLAGS)
|
AC_SUBST(RELDFLAGS)
|
||||||
|
AC_SUBST(CORE_LDFLAGS)
|
||||||
|
AC_SUBST(CORE_CPPFLAGS)
|
||||||
|
AC_SUBST(CORE_CXXFLAGS)
|
||||||
|
AC_SUBST(DEBUG_CFLAGS)
|
||||||
AC_SUBST(DEBUG_CPPFLAGS)
|
AC_SUBST(DEBUG_CPPFLAGS)
|
||||||
|
AC_SUBST(DEBUG_CXXFLAGS)
|
||||||
AC_SUBST(WARN_CXXFLAGS)
|
AC_SUBST(WARN_CXXFLAGS)
|
||||||
AC_SUBST(NOWARN_CXXFLAGS)
|
AC_SUBST(NOWARN_CXXFLAGS)
|
||||||
AC_SUBST(DEBUG_CXXFLAGS)
|
|
||||||
AC_SUBST(ERROR_CXXFLAGS)
|
AC_SUBST(ERROR_CXXFLAGS)
|
||||||
AC_SUBST(GPROF_CXXFLAGS)
|
AC_SUBST(GPROF_CXXFLAGS)
|
||||||
AC_SUBST(GPROF_LDFLAGS)
|
AC_SUBST(GPROF_LDFLAGS)
|
||||||
@ -1995,10 +2009,10 @@ echo " target os = $host_os"
|
|||||||
echo " build os = $build_os"
|
echo " build os = $build_os"
|
||||||
echo
|
echo
|
||||||
echo " CC = $CC"
|
echo " CC = $CC"
|
||||||
echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS"
|
echo " CFLAGS = $DEBUG_CFLAGS $PTHREAD_CFLAGS $CFLAGS"
|
||||||
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CPPFLAGS"
|
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
|
||||||
echo " CXX = $CXX"
|
echo " CXX = $CXX"
|
||||||
echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CXXFLAGS"
|
echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||||
echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS"
|
echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
|
||||||
echo " ARFLAGS = $ARFLAGS"
|
echo " ARFLAGS = $ARFLAGS"
|
||||||
echo
|
echo
|
||||||
|
@ -7,14 +7,17 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
|
|||||||
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
|
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
|
||||||
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
|
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
|
||||||
|
|
||||||
|
# Install packages for i386 on amd64 hosts, then install common packages
|
||||||
# Install packages for i386; disabled on aarch64 and arm64 hosts
|
RUN set -ex; \
|
||||||
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
|
apt-get update && \
|
||||||
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
|
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
||||||
g++-multilib \
|
dpkg --add-architecture i386 && \
|
||||||
wine32) && rm -rf /var/lib/apt/lists/*)
|
apt-get update && \
|
||||||
|
apt-get install $APT_ARGS \
|
||||||
RUN apt-get update && apt-get install $APT_ARGS \
|
g++-multilib \
|
||||||
|
wine32; \
|
||||||
|
fi; \
|
||||||
|
apt-get install $APT_ARGS \
|
||||||
autotools-dev \
|
autotools-dev \
|
||||||
automake \
|
automake \
|
||||||
autoconf \
|
autoconf \
|
||||||
@ -23,13 +26,11 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
bsdmainutils \
|
bsdmainutils \
|
||||||
curl \
|
curl \
|
||||||
ccache \
|
ccache \
|
||||||
clang \
|
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
g++ \
|
||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
libc++-dev \
|
gnupg \
|
||||||
libc++abi-dev \
|
|
||||||
libtool \
|
libtool \
|
||||||
libxcb-icccm4 \
|
libxcb-icccm4 \
|
||||||
libxcb-image0 \
|
libxcb-image0 \
|
||||||
@ -42,11 +43,38 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
libxcb-xinerama0 \
|
libxcb-xinerama0 \
|
||||||
libxcb-xkb1 \
|
libxcb-xkb1 \
|
||||||
libxkbcommon-x11-0 \
|
libxkbcommon-x11-0 \
|
||||||
wget \
|
lsb-release \
|
||||||
|
software-properties-common \
|
||||||
unzip \
|
unzip \
|
||||||
|
wget \
|
||||||
m4 \
|
m4 \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
zlib1g-dev
|
zlib1g-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Clang+LLVM and set it as default
|
||||||
|
# We don't need all packages but the default set doesn't include some
|
||||||
|
# packages we want so we will need to install some of them manually.
|
||||||
|
ARG LLVM_VERSION=16
|
||||||
|
RUN set -ex; \
|
||||||
|
echo "Installing LLVM and Clang ${LLVM_VERSION}..."; \
|
||||||
|
curl -sL https://apt.llvm.org/llvm.sh | bash -s "${LLVM_VERSION}"; \
|
||||||
|
echo "Installing additional packages..."; \
|
||||||
|
apt-get update && apt-get install $APT_ARGS \
|
||||||
|
"clang-format-${LLVM_VERSION}" \
|
||||||
|
"clang-tidy-${LLVM_VERSION}" \
|
||||||
|
"libc++-${LLVM_VERSION}-dev" \
|
||||||
|
"libc++abi-${LLVM_VERSION}-dev" \
|
||||||
|
"libclang-rt-${LLVM_VERSION}-dev"; \
|
||||||
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
|
echo "Setting defaults..."; \
|
||||||
|
lldbUpdAltArgs="update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${LLVM_VERSION} 100"; \
|
||||||
|
for binName in clang clang++ clang-format clang-tidy clangd ld.lld lldb lldb-server; do \
|
||||||
|
lldbUpdAltArgs="${lldbUpdAltArgs} --slave /usr/bin/${binName} ${binName} /usr/bin/${binName}-${LLVM_VERSION}"; \
|
||||||
|
done; \
|
||||||
|
sh -c "${lldbUpdAltArgs}";
|
||||||
|
# LD_LIBRARY_PATH is empty by default, this is the first entry
|
||||||
|
ENV LD_LIBRARY_PATH="/usr/lib/llvm-${LLVM_VERSION}/lib"
|
||||||
|
|
||||||
# Python setup
|
# Python setup
|
||||||
# PYTHON_VERSION should match the value in .python-version
|
# PYTHON_VERSION should match the value in .python-version
|
||||||
@ -61,10 +89,11 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
libreadline-dev \
|
libreadline-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
llvm \
|
|
||||||
make \
|
make \
|
||||||
tk-dev \
|
tk-dev \
|
||||||
xz-utils
|
xz-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV PYENV_ROOT="/usr/local/pyenv"
|
ENV PYENV_ROOT="/usr/local/pyenv"
|
||||||
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
|
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
|
||||||
RUN curl https://pyenv.run | bash \
|
RUN curl https://pyenv.run | bash \
|
||||||
@ -82,19 +111,38 @@ RUN pip3 install \
|
|||||||
pyzmq==22.3.0 \
|
pyzmq==22.3.0 \
|
||||||
vulture==2.3
|
vulture==2.3
|
||||||
|
|
||||||
# dash_hash
|
|
||||||
ARG DASH_HASH_VERSION=1.4.0
|
ARG DASH_HASH_VERSION=1.4.0
|
||||||
RUN git clone --depth 1 --no-tags --branch=${DASH_HASH_VERSION} https://github.com/dashpay/dash_hash
|
RUN set -ex; \
|
||||||
RUN cd dash_hash && pip3 install -r requirements.txt .
|
cd /tmp; \
|
||||||
|
git clone --depth 1 --no-tags --branch=${DASH_HASH_VERSION} https://github.com/dashpay/dash_hash; \
|
||||||
|
cd dash_hash && pip3 install -r requirements.txt .; \
|
||||||
|
cd .. && rm -rf dash_hash
|
||||||
|
|
||||||
|
ARG CPPCHECK_VERSION=2.13.0
|
||||||
|
RUN set -ex; \
|
||||||
|
curl -fL "https://github.com/danmar/cppcheck/archive/${CPPCHECK_VERSION}.tar.gz" -o /tmp/cppcheck.tar.gz; \
|
||||||
|
mkdir -p /opt/cppcheck && tar -xzf /tmp/cppcheck.tar.gz -C /opt/cppcheck --strip-components=1 && rm /tmp/cppcheck.tar.gz; \
|
||||||
|
cd /opt/cppcheck; \
|
||||||
|
mkdir build && cd build && cmake .. && cmake --build . -j "$(( $(nproc) - 1 ))"; \
|
||||||
|
mkdir /usr/local/share/Cppcheck && ln -s /opt/cppcheck/cfg/ /usr/local/share/Cppcheck/cfg; \
|
||||||
|
rm -rf /tmp/cppcheck.tar.gz
|
||||||
|
ENV PATH="/opt/cppcheck/build/bin:${PATH}"
|
||||||
|
|
||||||
|
ARG SHELLCHECK_VERSION=v0.7.1
|
||||||
|
RUN set -ex; \
|
||||||
|
curl -fL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" -o /tmp/shellcheck.tar.xz; \
|
||||||
|
mkdir -p /opt/shellcheck && tar -xf /tmp/shellcheck.tar.xz -C /opt/shellcheck --strip-components=1 && rm /tmp/shellcheck.tar.xz
|
||||||
|
ENV PATH="/opt/shellcheck:${PATH}"
|
||||||
|
|
||||||
|
# Add user with specified (or default) user/group ids and setup configuration files
|
||||||
ARG USER_ID=1000
|
ARG USER_ID=1000
|
||||||
ARG GROUP_ID=1000
|
ARG GROUP_ID=1000
|
||||||
|
RUN set -ex; \
|
||||||
# add user with specified (or default) user/group ids
|
groupadd -g ${GROUP_ID} dash; \
|
||||||
ENV USER_ID="${USER_ID}"
|
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash; \
|
||||||
ENV GROUP_ID="${GROUP_ID}"
|
mkdir -p /home/dash/.config/gdb; \
|
||||||
RUN groupadd -g ${GROUP_ID} dash
|
echo "add-auto-load-safe-path /usr/lib/llvm-${LLVM_VERSION}/lib" | tee /home/dash/.config/gdb/gdbinit; \
|
||||||
RUN useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash
|
chown ${USER_ID}:${GROUP_ID} -R /home/dash
|
||||||
|
|
||||||
# Packages needed for all target builds
|
# Packages needed for all target builds
|
||||||
RUN apt-get update && apt-get install $APT_ARGS \
|
RUN apt-get update && apt-get install $APT_ARGS \
|
||||||
@ -111,17 +159,8 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
valgrind \
|
valgrind \
|
||||||
wine-stable \
|
wine-stable \
|
||||||
wine64 \
|
wine64 \
|
||||||
xorriso
|
xorriso \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
ARG CPPCHECK_VERSION=2.13.0
|
|
||||||
RUN curl -sL "https://github.com/danmar/cppcheck/archive/${CPPCHECK_VERSION}.tar.gz" | tar -xvzf - --directory /tmp/
|
|
||||||
RUN cd /tmp/cppcheck-${CPPCHECK_VERSION} && mkdir build && cd build && cmake .. && cmake --build . -j 8
|
|
||||||
ENV PATH="/tmp/cppcheck-${CPPCHECK_VERSION}/build/bin:${PATH}"
|
|
||||||
RUN mkdir /usr/local/share/Cppcheck && ln -s /tmp/cppcheck-${CPPCHECK_VERSION}/cfg/ /usr/local/share/Cppcheck/cfg
|
|
||||||
|
|
||||||
ARG SHELLCHECK_VERSION=v0.7.1
|
|
||||||
RUN curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
|
|
||||||
ENV PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
|
|
||||||
|
|
||||||
# This is a hack. It is needed because gcc-multilib and g++-multilib are conflicting with g++-arm-linux-gnueabihf. This is
|
# This is a hack. It is needed because gcc-multilib and g++-multilib are conflicting with g++-arm-linux-gnueabihf. This is
|
||||||
# due to gcc-multilib installing the following symbolic link, which is needed for -m32 support. However, this causes
|
# due to gcc-multilib installing the following symbolic link, which is needed for -m32 support. However, this causes
|
||||||
@ -135,20 +174,6 @@ RUN \
|
|||||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
|
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
ARG LLVM_VERSION=16
|
|
||||||
# Setup Clang+LLVM support
|
|
||||||
RUN apt-get update && apt-get install $APT_ARGS \
|
|
||||||
lsb-release \
|
|
||||||
software-properties-common \
|
|
||||||
gnupg \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN cd /tmp && \
|
|
||||||
wget https://apt.llvm.org/llvm.sh && \
|
|
||||||
chmod +x llvm.sh && \
|
|
||||||
/tmp/llvm.sh ${LLVM_VERSION} && \
|
|
||||||
rm -rf /tmp/llvm.sh
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
mkdir -p /src/dash && \
|
mkdir -p /src/dash && \
|
||||||
mkdir -p /cache/ccache && \
|
mkdir -p /cache/ccache && \
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
version: "3.9"
|
|
||||||
services:
|
services:
|
||||||
container:
|
container:
|
||||||
entrypoint: /bin/bash
|
entrypoint: /bin/bash
|
||||||
build:
|
build:
|
||||||
context: '..'
|
context: '..'
|
||||||
dockerfile: './develop/Dockerfile'
|
dockerfile: './develop/Dockerfile'
|
||||||
tty: true # Equivalent to -t
|
|
||||||
stdin_open: true # Equivalent to -i
|
|
||||||
ports:
|
ports:
|
||||||
- "9998:9998" # Mainnet Ports
|
- "9998:9998" # Mainnet Ports
|
||||||
- "9999:9999"
|
- "9999:9999"
|
||||||
- "19998:19998" # Testnet Ports
|
- "19998:19998" # Testnet Ports
|
||||||
- "19999:19999"
|
- "19999:19999"
|
||||||
|
security_opt:
|
||||||
|
- seccomp:unconfined
|
||||||
|
stdin_open: true # Equivalent to -i
|
||||||
|
tty: true # Equivalent to -t
|
||||||
|
|
||||||
# A note about volumes:
|
# A note about volumes:
|
||||||
#
|
#
|
||||||
|
@ -18,7 +18,11 @@ RUN apt-get update && \
|
|||||||
sudo \
|
sudo \
|
||||||
wget \
|
wget \
|
||||||
xz-utils && \
|
xz-utils && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
|
targetLocale="en_US.UTF-8"; \
|
||||||
|
locale-gen ${targetLocale} && \
|
||||||
|
update-locale LC_ALL=${targetLocale} && \
|
||||||
|
update-locale LANG=${targetLocale};
|
||||||
|
|
||||||
ARG guix_download_path=ftp://ftp.gnu.org/gnu/guix
|
ARG guix_download_path=ftp://ftp.gnu.org/gnu/guix
|
||||||
ARG guix_version=1.4.0
|
ARG guix_version=1.4.0
|
||||||
@ -30,8 +34,7 @@ ENV PATH="/usr/local/bin:/usr/local/guix/current/bin:$PATH"
|
|||||||
|
|
||||||
# Application Setup
|
# Application Setup
|
||||||
# https://guix.gnu.org/manual/en/html_node/Application-Setup.html
|
# https://guix.gnu.org/manual/en/html_node/Application-Setup.html
|
||||||
ENV GUIX_LOCPATH="/usr/local/guix/profile" \
|
ENV GUIX_LOCPATH="/usr/local/guix/profile"
|
||||||
LC_ALL="en_US.UTF-8"
|
|
||||||
|
|
||||||
RUN guix_file_name=guix-binary-${guix_version}.$(uname -m)-linux.tar.xz && \
|
RUN guix_file_name=guix-binary-${guix_version}.$(uname -m)-linux.tar.xz && \
|
||||||
eval "guix_checksum=\${guix_checksum_$(uname -m)}" && \
|
eval "guix_checksum=\${guix_checksum_$(uname -m)}" && \
|
||||||
@ -74,18 +77,19 @@ RUN usermod -aG sudo ${USERNAME} && \
|
|||||||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
# Copy required files to container
|
# Copy required files to container
|
||||||
COPY --from=docker_root ./motd.txt /etc/motd
|
COPY --from=docker_root ./motd.txt /etc/motd
|
||||||
COPY --from=docker_root ./scripts/entrypoint /usr/local/bin/entrypoint
|
COPY --from=docker_root ./scripts/entrypoint /usr/local/bin/entrypoint
|
||||||
COPY --from=docker_root ./scripts/guix-check /usr/local/bin/guix-check
|
COPY --from=docker_root ./scripts/guix-check /usr/local/bin/guix-check
|
||||||
COPY --from=docker_root ./scripts/guix-start /usr/local/bin/guix-start
|
COPY --from=docker_root ./scripts/guix-start /usr/local/bin/guix-start
|
||||||
|
COPY --from=docker_root ./scripts/setup-sdk /usr/local/bin/setup-sdk
|
||||||
|
|
||||||
# Create directories for mounting to save/restore cache and grant necessary permissions
|
# Create directories for mounting to save/restore cache and grant necessary permissions
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
/home/${USERNAME}/.cache \
|
/home/${USERNAME}/.cache \
|
||||||
/src/dash/depends/{built,sources,work} && \
|
/src/dash/depends/{built,sources,work}; \
|
||||||
chown -R ${USER_ID}:${GROUP_ID} \
|
chown -R ${USER_ID}:${GROUP_ID} \
|
||||||
/home/${USERNAME}/.cache \
|
/home/${USERNAME}/.cache \
|
||||||
/src
|
/src;
|
||||||
|
|
||||||
WORKDIR "/src/dash"
|
WORKDIR "/src/dash"
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
version: "3.9"
|
|
||||||
services:
|
services:
|
||||||
guix_ubuntu:
|
guix_ubuntu:
|
||||||
build:
|
build:
|
||||||
|
@ -9,19 +9,10 @@ if [[ ! -d "${WORKSPACE_PATH}" || ! "${WORKSPACE_PATH}" = /* || ! -f "${WORKSPAC
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
XCODE_VERSION="15.0"
|
|
||||||
XCODE_RELEASE="15A240d"
|
|
||||||
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
|
|
||||||
XCODE_SOURCE="${XCODE_SOURCE:-https://bitcoincore.org/depends-sources/sdks}"
|
|
||||||
|
|
||||||
export SDK_PATH="${SDK_PATH:-${WORKSPACE_PATH}/depends/SDKs}"
|
export SDK_PATH="${SDK_PATH:-${WORKSPACE_PATH}/depends/SDKs}"
|
||||||
|
export SDK_SRCS="${SDK_PATH:-${WORKSPACE_PATH}/depends/sdk-sources}"
|
||||||
|
|
||||||
# Check if macOS SDK is present, if not, download it
|
./contrib/containers/guix/scripts/setup-sdk
|
||||||
if [[ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]]; then
|
|
||||||
echo "Preparing macOS SDK..."
|
|
||||||
mkdir -p "${SDK_PATH}"
|
|
||||||
curl -L "${XCODE_SOURCE}/${XCODE_ARCHIVE}.tar.gz" | tar -xz -C "${SDK_PATH}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add safe.directory option only when WORKSPACE_PATH was specified via cmd-line arguments (happens in CI)
|
# Add safe.directory option only when WORKSPACE_PATH was specified via cmd-line arguments (happens in CI)
|
||||||
if [[ -n "${1}" ]]; then
|
if [[ -n "${1}" ]]; then
|
||||||
|
27
contrib/containers/guix/scripts/setup-sdk
Executable file
27
contrib/containers/guix/scripts/setup-sdk
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (c) 2024 The Dash Core developers
|
||||||
|
# Distributed under the MIT software license, see the accompanying
|
||||||
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
SDK_URL="${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}"
|
||||||
|
SDK_PATH="${SDK_PATH:-depends/SDKs}"
|
||||||
|
SDK_SRCS="${SDK_SOURCES:-depends/sdk-sources}"
|
||||||
|
XCODE_VERSION="${XCODE_VERSION:-15.0}"
|
||||||
|
XCODE_RELEASE="${XCODE_RELEASE:-15A240d}"
|
||||||
|
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
|
||||||
|
XCODE_AR_PATH="${SDK_SRCS}/${XCODE_ARCHIVE}.tar.gz"
|
||||||
|
|
||||||
|
if [ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]; then
|
||||||
|
if [ ! -f "${XCODE_AR_PATH}" ]; then
|
||||||
|
echo "Downloading macOS SDK..."
|
||||||
|
mkdir -p "${SDK_SRCS}"
|
||||||
|
curl --location --fail "${SDK_URL}/${XCODE_ARCHIVE}.tar.gz" -o "${XCODE_AR_PATH}"
|
||||||
|
fi
|
||||||
|
echo "Extracting macOS SDK..."
|
||||||
|
mkdir -p "${SDK_PATH}"
|
||||||
|
tar -C "${SDK_PATH}" -xf "${XCODE_AR_PATH}"
|
||||||
|
fi
|
@ -159,9 +159,15 @@ $(package)_config_opts_linux += -dbus-runtime
|
|||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
$(package)_config_opts_linux += -ltcg
|
$(package)_config_opts_linux += -ltcg
|
||||||
endif
|
endif
|
||||||
$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
|
|
||||||
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
|
ifneq (,$(findstring clang,$($(package)_cxx)))
|
||||||
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
|
ifneq (,$(findstring -stdlib=libc++,$($(package)_cxx)))
|
||||||
|
$(package)_config_opts_linux += -platform linux-clang-libc++ -xplatform linux-clang-libc++
|
||||||
|
else
|
||||||
|
$(package)_config_opts_linux += -platform linux-clang -xplatform linux-clang
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(package)_config_opts_mingw32 = -no-opengl
|
$(package)_config_opts_mingw32 = -no-opengl
|
||||||
|
@ -9,9 +9,10 @@ print-%: FORCE
|
|||||||
|
|
||||||
DIST_SUBDIRS = secp256k1
|
DIST_SUBDIRS = secp256k1
|
||||||
|
|
||||||
AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS)
|
AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) $(CORE_LDFLAGS)
|
||||||
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
|
AM_CFLAGS = $(DEBUG_CFLAGS)
|
||||||
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS)
|
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(CORE_CXXFLAGS)
|
||||||
|
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS)
|
||||||
AM_LIBTOOLFLAGS = --preserve-dup-deps
|
AM_LIBTOOLFLAGS = --preserve-dup-deps
|
||||||
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||||
EXTRA_LIBRARIES =
|
EXTRA_LIBRARIES =
|
||||||
@ -162,9 +163,9 @@ BITCOIN_CORE_H = \
|
|||||||
coinjoin/util.h \
|
coinjoin/util.h \
|
||||||
coins.h \
|
coins.h \
|
||||||
common/bloom.h \
|
common/bloom.h \
|
||||||
compat.h \
|
|
||||||
compat/assumptions.h \
|
compat/assumptions.h \
|
||||||
compat/byteswap.h \
|
compat/byteswap.h \
|
||||||
|
compat/compat.h \
|
||||||
compat/cpuid.h \
|
compat/cpuid.h \
|
||||||
compat/endian.h \
|
compat/endian.h \
|
||||||
compressor.h \
|
compressor.h \
|
||||||
@ -281,7 +282,7 @@ BITCOIN_CORE_H = \
|
|||||||
node/psbt.h \
|
node/psbt.h \
|
||||||
node/transaction.h \
|
node/transaction.h \
|
||||||
node/txreconciliation.h \
|
node/txreconciliation.h \
|
||||||
node/ui_interface.h \
|
node/interface_ui.h \
|
||||||
node/utxo_snapshot.h \
|
node/utxo_snapshot.h \
|
||||||
noui.h \
|
noui.h \
|
||||||
outputtype.h \
|
outputtype.h \
|
||||||
@ -516,7 +517,7 @@ libbitcoin_server_a_SOURCES = \
|
|||||||
node/psbt.cpp \
|
node/psbt.cpp \
|
||||||
node/transaction.cpp \
|
node/transaction.cpp \
|
||||||
node/txreconciliation.cpp \
|
node/txreconciliation.cpp \
|
||||||
node/ui_interface.cpp \
|
node/interface_ui.cpp \
|
||||||
noui.cpp \
|
noui.cpp \
|
||||||
policy/fees.cpp \
|
policy/fees.cpp \
|
||||||
policy/packages.cpp \
|
policy/packages.cpp \
|
||||||
@ -796,7 +797,6 @@ libbitcoin_util_a_SOURCES = \
|
|||||||
support/lockedpool.cpp \
|
support/lockedpool.cpp \
|
||||||
chainparamsbase.cpp \
|
chainparamsbase.cpp \
|
||||||
clientversion.cpp \
|
clientversion.cpp \
|
||||||
compat/strnlen.cpp \
|
|
||||||
fs.cpp \
|
fs.cpp \
|
||||||
interfaces/echo.cpp \
|
interfaces/echo.cpp \
|
||||||
interfaces/handler.cpp \
|
interfaces/handler.cpp \
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <banman.h>
|
#include <banman.h>
|
||||||
|
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <chainparamsbase.h>
|
#include <chainparamsbase.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <compat/stdin.h>
|
#include <compat/stdin.h>
|
||||||
#include <policy/feerate.h>
|
#include <policy/feerate.h>
|
||||||
#include <rpc/client.h>
|
#include <rpc/client.h>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <coins.h>
|
#include <coins.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <core_io.h>
|
#include <core_io.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
@ -220,6 +220,16 @@ static void MutateTxLocktime(CMutableTransaction& tx, const std::string& cmdVal)
|
|||||||
tx.nLockTime = (unsigned int) newLocktime;
|
tx.nLockTime = (unsigned int) newLocktime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static T TrimAndParse(const std::string& int_str, const std::string& err)
|
||||||
|
{
|
||||||
|
const auto parsed{ToIntegral<T>(TrimString(int_str))};
|
||||||
|
if (!parsed.has_value()) {
|
||||||
|
throw std::runtime_error(err + " '" + int_str + "'");
|
||||||
|
}
|
||||||
|
return parsed.value();
|
||||||
|
}
|
||||||
|
|
||||||
static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput)
|
static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput)
|
||||||
{
|
{
|
||||||
std::vector<std::string> vStrInputParts = SplitString(strInput, ':');
|
std::vector<std::string> vStrInputParts = SplitString(strInput, ':');
|
||||||
@ -245,8 +255,9 @@ static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInpu
|
|||||||
|
|
||||||
// extract the optional sequence number
|
// extract the optional sequence number
|
||||||
uint32_t nSequenceIn = CTxIn::SEQUENCE_FINAL;
|
uint32_t nSequenceIn = CTxIn::SEQUENCE_FINAL;
|
||||||
if (vStrInputParts.size() > 2)
|
if (vStrInputParts.size() > 2) {
|
||||||
nSequenceIn = std::stoul(vStrInputParts[2]);
|
nSequenceIn = TrimAndParse<uint32_t>(vStrInputParts.at(2), "invalid TX sequence id");
|
||||||
|
}
|
||||||
|
|
||||||
// append to transaction input list
|
// append to transaction input list
|
||||||
CTxIn txin(txid, vout, CScript(), nSequenceIn);
|
CTxIn txin(txid, vout, CScript(), nSequenceIn);
|
||||||
@ -324,10 +335,10 @@ static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& s
|
|||||||
CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
|
CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
|
||||||
|
|
||||||
// Extract REQUIRED
|
// Extract REQUIRED
|
||||||
uint32_t required = stoul(vStrInputParts[1]);
|
const uint32_t required{TrimAndParse<uint32_t>(vStrInputParts.at(1), "invalid multisig required number")};
|
||||||
|
|
||||||
// Extract NUMKEYS
|
// Extract NUMKEYS
|
||||||
uint32_t numkeys = stoul(vStrInputParts[2]);
|
const uint32_t numkeys{TrimAndParse<uint32_t>(vStrInputParts.at(2), "invalid multisig total number")};
|
||||||
|
|
||||||
// Validate there are the correct number of pubkeys
|
// Validate there are the correct number of pubkeys
|
||||||
if (vStrInputParts.size() < numkeys + 3)
|
if (vStrInputParts.size() < numkeys + 3)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <chainparamsbase.h>
|
#include <chainparamsbase.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <interfaces/chain.h>
|
#include <interfaces/chain.h>
|
||||||
#include <interfaces/init.h>
|
#include <interfaces/init.h>
|
||||||
#include <node/context.h>
|
#include <node/context.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <noui.h>
|
#include <noui.h>
|
||||||
#include <shutdown.h>
|
#include <shutdown.h>
|
||||||
#include <util/check.h>
|
#include <util/check.h>
|
||||||
|
@ -314,8 +314,8 @@ void CRollingBloomFilter::insert(Span<const unsigned char> vKey)
|
|||||||
/* FastMod works with the upper bits of h, so it is safe to ignore that the lower bits of h are already used for bit. */
|
/* FastMod works with the upper bits of h, so it is safe to ignore that the lower bits of h are already used for bit. */
|
||||||
uint32_t pos = FastRange32(h, data.size());
|
uint32_t pos = FastRange32(h, data.size());
|
||||||
/* The lowest bit of pos is ignored, and set to zero for the first bit, and to one for the second. */
|
/* The lowest bit of pos is ignored, and set to zero for the first bit, and to one for the second. */
|
||||||
data[pos & ~1] = (data[pos & ~1] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration & 1)) << bit;
|
data[pos & ~1U] = (data[pos & ~1U] & ~(uint64_t{1} << bit)) | (uint64_t(nGeneration & 1)) << bit;
|
||||||
data[pos | 1] = (data[pos | 1] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration >> 1)) << bit;
|
data[pos | 1] = (data[pos | 1] & ~(uint64_t{1} << bit)) | (uint64_t(nGeneration >> 1)) << bit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ bool CRollingBloomFilter::contains(Span<const unsigned char> vKey) const
|
|||||||
int bit = h & 0x3F;
|
int bit = h & 0x3F;
|
||||||
uint32_t pos = FastRange32(h, data.size());
|
uint32_t pos = FastRange32(h, data.size());
|
||||||
/* If the relevant bit is not set in either data[pos & ~1] or data[pos | 1], the filter does not contain vKey */
|
/* If the relevant bit is not set in either data[pos & ~1] or data[pos | 1], the filter does not contain vKey */
|
||||||
if (!(((data[pos & ~1] | data[pos | 1]) >> bit) & 1)) {
|
if (!(((data[pos & ~1U] | data[pos | 1]) >> bit) & 1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef BITCOIN_COMPAT_ASSUMPTIONS_H
|
#ifndef BITCOIN_COMPAT_ASSUMPTIONS_H
|
||||||
#define BITCOIN_COMPAT_ASSUMPTIONS_H
|
#define BITCOIN_COMPAT_ASSUMPTIONS_H
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
// Assumption: We assume that the macro NDEBUG is not defined.
|
// Assumption: We assume that the macro NDEBUG is not defined.
|
||||||
|
@ -3,24 +3,24 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_COMPAT_H
|
#ifndef BITCOIN_COMPAT_COMPAT_H
|
||||||
#define BITCOIN_COMPAT_H
|
#define BITCOIN_COMPAT_COMPAT_H
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
#if defined(HAVE_CONFIG_H)
|
||||||
#include <config/bitcoin-config.h>
|
#include <config/bitcoin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Windows defines FD_SETSIZE to 64 (see _fd_types.h in mingw-w64),
|
||||||
|
// which is too small for our usage, but allows us to redefine it safely.
|
||||||
|
// We redefine it to be 1024, to match glibc, see typesizes.h.
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#ifdef FD_SETSIZE
|
#ifdef FD_SETSIZE
|
||||||
#undef FD_SETSIZE // prevent redefinition compiler warning
|
#undef FD_SETSIZE
|
||||||
#endif
|
#endif
|
||||||
#define FD_SETSIZE 1024 // max number of fds in fd_set
|
#define FD_SETSIZE 1024
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
#else
|
#else
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
@ -37,54 +37,46 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We map Linux / BSD error functions and codes, to the equivalent
|
||||||
|
// Windows definitions, and use the WSA* names throughout our code.
|
||||||
|
// Note that glibc defines EWOULDBLOCK as EAGAIN (see errno.h).
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
typedef unsigned int SOCKET;
|
typedef unsigned int SOCKET;
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#define WSAGetLastError() errno
|
#define WSAGetLastError() errno
|
||||||
#define WSAEINVAL EINVAL
|
#define WSAEINVAL EINVAL
|
||||||
#define WSAEALREADY EALREADY
|
|
||||||
#define WSAEWOULDBLOCK EWOULDBLOCK
|
#define WSAEWOULDBLOCK EWOULDBLOCK
|
||||||
#define WSAEAGAIN EAGAIN
|
#define WSAEAGAIN EAGAIN
|
||||||
#define WSAEMSGSIZE EMSGSIZE
|
#define WSAEMSGSIZE EMSGSIZE
|
||||||
#define WSAEINTR EINTR
|
#define WSAEINTR EINTR
|
||||||
#define WSAEINPROGRESS EINPROGRESS
|
#define WSAEINPROGRESS EINPROGRESS
|
||||||
#define WSAEADDRINUSE EADDRINUSE
|
#define WSAEADDRINUSE EADDRINUSE
|
||||||
#define WSAENOTSOCK EBADF
|
|
||||||
#define INVALID_SOCKET (SOCKET)(~0)
|
#define INVALID_SOCKET (SOCKET)(~0)
|
||||||
#define SOCKET_ERROR -1
|
#define SOCKET_ERROR -1
|
||||||
#define SD_SEND SHUT_WR
|
#define SD_SEND SHUT_WR
|
||||||
#else
|
#else
|
||||||
#ifndef WSAEAGAIN
|
// WSAEAGAIN doesn't exist on Windows
|
||||||
#ifdef EAGAIN
|
#ifdef EAGAIN
|
||||||
#define WSAEAGAIN EAGAIN
|
#define WSAEAGAIN EAGAIN
|
||||||
#else
|
#else
|
||||||
#define WSAEAGAIN WSAEWOULDBLOCK
|
#define WSAEAGAIN WSAEWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
// Windows defines MAX_PATH as it's maximum path length.
|
||||||
#ifndef S_IRUSR
|
// We define MAX_PATH for use on non-Windows systems.
|
||||||
#define S_IRUSR 0400
|
#ifndef WIN32
|
||||||
#define S_IWUSR 0200
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define MAX_PATH 1024
|
#define MAX_PATH 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ssize_t is POSIX, and not present when using MSVC.
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#if !defined(ssize_t)
|
#include <BaseTsd.h>
|
||||||
#ifdef _WIN64
|
typedef SSIZE_T ssize_t;
|
||||||
typedef int64_t ssize_t;
|
|
||||||
#else
|
|
||||||
typedef int32_t ssize_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
// The type of the option value passed to getsockopt & setsockopt
|
||||||
size_t strnlen( const char *start, size_t max_len);
|
// differs between Windows and non-Windows.
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
typedef void* sockopt_arg_type;
|
typedef void* sockopt_arg_type;
|
||||||
#else
|
#else
|
||||||
@ -135,4 +127,4 @@ bool static inline IsSelectableSocket(const SOCKET& s) {
|
|||||||
#define MSG_DONTWAIT 0
|
#define MSG_DONTWAIT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // BITCOIN_COMPAT_H
|
#endif // BITCOIN_COMPAT_COMPAT_H
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
|
||||||
#include <config/bitcoin-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
|
||||||
size_t strnlen( const char *start, size_t max_len)
|
|
||||||
{
|
|
||||||
const char *end = (const char *)memchr(start, '\0', max_len);
|
|
||||||
|
|
||||||
return end ? (size_t)(end - start) : max_len;
|
|
||||||
}
|
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
@ -11,9 +11,6 @@
|
|||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <chainparamsbase.h>
|
#include <chainparamsbase.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <rpc/protocol.h> // For HTTP status codes
|
#include <rpc/protocol.h> // For HTTP status codes
|
||||||
#include <shutdown.h>
|
#include <shutdown.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <compat/endian.h>
|
#include <compat/endian.h>
|
||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#ifndef BITCOIN_I2P_H
|
#ifndef BITCOIN_I2P_H
|
||||||
#define BITCOIN_I2P_H
|
#define BITCOIN_I2P_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <index/base.h>
|
#include <index/base.h>
|
||||||
#include <node/blockstorage.h>
|
#include <node/blockstorage.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <shutdown.h>
|
#include <shutdown.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
#include <util/thread.h>
|
#include <util/thread.h>
|
||||||
|
15
src/init.cpp
15
src/init.cpp
@ -41,7 +41,7 @@
|
|||||||
#include <node/caches.h>
|
#include <node/caches.h>
|
||||||
#include <node/chainstate.h>
|
#include <node/chainstate.h>
|
||||||
#include <node/context.h>
|
#include <node/context.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <node/txreconciliation.h>
|
#include <node/txreconciliation.h>
|
||||||
#include <policy/feerate.h>
|
#include <policy/feerate.h>
|
||||||
#include <policy/fees.h>
|
#include <policy/fees.h>
|
||||||
@ -1436,11 +1436,6 @@ bool AppInitLockDataDirectory()
|
|||||||
bool AppInitInterfaces(NodeContext& node)
|
bool AppInitInterfaces(NodeContext& node)
|
||||||
{
|
{
|
||||||
node.chain = interfaces::MakeChain(node);
|
node.chain = interfaces::MakeChain(node);
|
||||||
// Create client interfaces for wallets that are supposed to be loaded
|
|
||||||
// according to -wallet and -disablewallet options. This only constructs
|
|
||||||
// the interfaces, it doesn't load wallet data. Wallets actually get loaded
|
|
||||||
// when load() and start() interface methods are called below.
|
|
||||||
g_wallet_init_interface.Construct(node);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1510,11 +1505,17 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
|
|
||||||
GetMainSignals().RegisterBackgroundSignalScheduler(*node.scheduler);
|
GetMainSignals().RegisterBackgroundSignalScheduler(*node.scheduler);
|
||||||
|
|
||||||
tableRPC.InitPlatformRestrictions();
|
// Create client interfaces for wallets that are supposed to be loaded
|
||||||
|
// according to -wallet and -disablewallet options. This only constructs
|
||||||
|
// the interfaces, it doesn't load wallet data. Wallets actually get loaded
|
||||||
|
// when load() and start() interface methods are called below.
|
||||||
|
g_wallet_init_interface.Construct(node);
|
||||||
|
uiInterface.InitWallet();
|
||||||
|
|
||||||
/* Register RPC commands regardless of -server setting so they will be
|
/* Register RPC commands regardless of -server setting so they will be
|
||||||
* available in the GUI RPC console even if external calls are disabled.
|
* available in the GUI RPC console even if external calls are disabled.
|
||||||
*/
|
*/
|
||||||
|
tableRPC.InitPlatformRestrictions();
|
||||||
RegisterAllCoreRPCCommands(tableRPC);
|
RegisterAllCoreRPCCommands(tableRPC);
|
||||||
for (const auto& client : node.chain_clients) {
|
for (const auto& client : node.chain_clients) {
|
||||||
client->registerRpcs();
|
client->registerRpcs();
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
#include <key.h>
|
#include <key.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <util/string.h>
|
#include <util/string.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
@ -309,6 +309,10 @@ public:
|
|||||||
using ShowProgressFn = std::function<void(const std::string& title, int progress, bool resume_possible)>;
|
using ShowProgressFn = std::function<void(const std::string& title, int progress, bool resume_possible)>;
|
||||||
virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
|
virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
|
||||||
|
|
||||||
|
//! Register handler for wallet client constructed messages.
|
||||||
|
using InitWalletFn = std::function<void()>;
|
||||||
|
virtual std::unique_ptr<Handler> handleInitWallet(InitWalletFn fn) = 0;
|
||||||
|
|
||||||
//! Register handler for number of connections changed messages.
|
//! Register handler for number of connections changed messages.
|
||||||
using NotifyNumConnectionsChangedFn = std::function<void(int new_num_connections)>;
|
using NotifyNumConnectionsChangedFn = std::function<void(int new_num_connections)>;
|
||||||
virtual std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) = 0;
|
virtual std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) = 0;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <consensus/validation.h>
|
#include <consensus/validation.h>
|
||||||
#include <masternode/sync.h>
|
#include <masternode/sync.h>
|
||||||
#include <node/blockstorage.h>
|
#include <node/blockstorage.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <scheduler.h>
|
#include <scheduler.h>
|
||||||
#include <spork.h>
|
#include <spork.h>
|
||||||
#include <txmempool.h>
|
#include <txmempool.h>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <util/thread.h>
|
#include <util/thread.h>
|
||||||
|
|
||||||
#ifdef USE_NATPMP
|
#ifdef USE_NATPMP
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <natpmp.h>
|
#include <natpmp.h>
|
||||||
#endif // USE_NATPMP
|
#endif // USE_NATPMP
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
#include <governance/governance.h>
|
#include <governance/governance.h>
|
||||||
#include <netfulfilledman.h>
|
#include <netfulfilledman.h>
|
||||||
#include <netmessagemaker.h>
|
#include <netmessagemaker.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <shutdown.h>
|
#include <shutdown.h>
|
||||||
#include <validation.h>
|
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
|
#include <validation.h>
|
||||||
|
|
||||||
class CMasternodeSync;
|
class CMasternodeSync;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <addrman.h>
|
#include <addrman.h>
|
||||||
#include <banman.h>
|
#include <banman.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
#include <node/eviction.h>
|
#include <node/eviction.h>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
#include <net_permissions.h>
|
#include <net_permissions.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <protocol.h>
|
#include <protocol.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <scheduler.h>
|
#include <scheduler.h>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <bip324.h>
|
#include <bip324.h>
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <common/bloom.h>
|
#include <common/bloom.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <consensus/amount.h>
|
#include <consensus/amount.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <crypto/siphash.h>
|
#include <crypto/siphash.h>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <attributes.h>
|
#include <attributes.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <crypto/siphash.h>
|
#include <crypto/siphash.h>
|
||||||
#include <prevector.h>
|
#include <prevector.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
#include <util/sock.h>
|
#include <util/sock.h>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <config/bitcoin-config.h>
|
#include <config/bitcoin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <serialize.h>
|
#include <serialize.h>
|
||||||
#include <util/sock.h>
|
#include <util/sock.h>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
|
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ struct UISignals {
|
|||||||
boost::signals2::signal<CClientUIInterface::ThreadSafeMessageBoxSig, boost::signals2::optional_last_value<bool>> ThreadSafeMessageBox;
|
boost::signals2::signal<CClientUIInterface::ThreadSafeMessageBoxSig, boost::signals2::optional_last_value<bool>> ThreadSafeMessageBox;
|
||||||
boost::signals2::signal<CClientUIInterface::ThreadSafeQuestionSig, boost::signals2::optional_last_value<bool>> ThreadSafeQuestion;
|
boost::signals2::signal<CClientUIInterface::ThreadSafeQuestionSig, boost::signals2::optional_last_value<bool>> ThreadSafeQuestion;
|
||||||
boost::signals2::signal<CClientUIInterface::InitMessageSig> InitMessage;
|
boost::signals2::signal<CClientUIInterface::InitMessageSig> InitMessage;
|
||||||
|
boost::signals2::signal<CClientUIInterface::InitWalletSig> InitWallet;
|
||||||
boost::signals2::signal<CClientUIInterface::NotifyNumConnectionsChangedSig> NotifyNumConnectionsChanged;
|
boost::signals2::signal<CClientUIInterface::NotifyNumConnectionsChangedSig> NotifyNumConnectionsChanged;
|
||||||
boost::signals2::signal<CClientUIInterface::NotifyNetworkActiveChangedSig> NotifyNetworkActiveChanged;
|
boost::signals2::signal<CClientUIInterface::NotifyNetworkActiveChangedSig> NotifyNetworkActiveChanged;
|
||||||
boost::signals2::signal<CClientUIInterface::NotifyAlertChangedSig> NotifyAlertChanged;
|
boost::signals2::signal<CClientUIInterface::NotifyAlertChangedSig> NotifyAlertChanged;
|
||||||
@ -37,6 +38,7 @@ static UISignals g_ui_signals;
|
|||||||
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeMessageBox);
|
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeMessageBox);
|
||||||
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeQuestion);
|
ADD_SIGNALS_IMPL_WRAPPER(ThreadSafeQuestion);
|
||||||
ADD_SIGNALS_IMPL_WRAPPER(InitMessage);
|
ADD_SIGNALS_IMPL_WRAPPER(InitMessage);
|
||||||
|
ADD_SIGNALS_IMPL_WRAPPER(InitWallet);
|
||||||
ADD_SIGNALS_IMPL_WRAPPER(NotifyNumConnectionsChanged);
|
ADD_SIGNALS_IMPL_WRAPPER(NotifyNumConnectionsChanged);
|
||||||
ADD_SIGNALS_IMPL_WRAPPER(NotifyNetworkActiveChanged);
|
ADD_SIGNALS_IMPL_WRAPPER(NotifyNetworkActiveChanged);
|
||||||
ADD_SIGNALS_IMPL_WRAPPER(NotifyAlertChanged);
|
ADD_SIGNALS_IMPL_WRAPPER(NotifyAlertChanged);
|
||||||
@ -51,6 +53,7 @@ ADD_SIGNALS_IMPL_WRAPPER(BannedListChanged);
|
|||||||
bool CClientUIInterface::ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeMessageBox(message, caption, style).value_or(false);}
|
bool CClientUIInterface::ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeMessageBox(message, caption, style).value_or(false);}
|
||||||
bool CClientUIInterface::ThreadSafeQuestion(const bilingual_str& message, const std::string& non_interactive_message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeQuestion(message, non_interactive_message, caption, style).value_or(false);}
|
bool CClientUIInterface::ThreadSafeQuestion(const bilingual_str& message, const std::string& non_interactive_message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeQuestion(message, non_interactive_message, caption, style).value_or(false);}
|
||||||
void CClientUIInterface::InitMessage(const std::string& message) { return g_ui_signals.InitMessage(message); }
|
void CClientUIInterface::InitMessage(const std::string& message) { return g_ui_signals.InitMessage(message); }
|
||||||
|
void CClientUIInterface::InitWallet() { return g_ui_signals.InitWallet(); }
|
||||||
void CClientUIInterface::NotifyNumConnectionsChanged(int newNumConnections) { return g_ui_signals.NotifyNumConnectionsChanged(newNumConnections); }
|
void CClientUIInterface::NotifyNumConnectionsChanged(int newNumConnections) { return g_ui_signals.NotifyNumConnectionsChanged(newNumConnections); }
|
||||||
void CClientUIInterface::NotifyNetworkActiveChanged(bool networkActive) { return g_ui_signals.NotifyNetworkActiveChanged(networkActive); }
|
void CClientUIInterface::NotifyNetworkActiveChanged(bool networkActive) { return g_ui_signals.NotifyNetworkActiveChanged(networkActive); }
|
||||||
void CClientUIInterface::NotifyAlertChanged() { return g_ui_signals.NotifyAlertChanged(); }
|
void CClientUIInterface::NotifyAlertChanged() { return g_ui_signals.NotifyAlertChanged(); }
|
@ -3,8 +3,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#ifndef BITCOIN_NODE_UI_INTERFACE_H
|
#ifndef BITCOIN_NODE_INTERFACE_UI_H
|
||||||
#define BITCOIN_NODE_UI_INTERFACE_H
|
#define BITCOIN_NODE_INTERFACE_UI_H
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -83,6 +83,9 @@ public:
|
|||||||
/** Progress message during initialization. */
|
/** Progress message during initialization. */
|
||||||
ADD_SIGNALS_DECL_WRAPPER(InitMessage, void, const std::string& message);
|
ADD_SIGNALS_DECL_WRAPPER(InitMessage, void, const std::string& message);
|
||||||
|
|
||||||
|
/** Wallet client created. */
|
||||||
|
ADD_SIGNALS_DECL_WRAPPER(InitWallet, void, );
|
||||||
|
|
||||||
/** Number of network connections changed. */
|
/** Number of network connections changed. */
|
||||||
ADD_SIGNALS_DECL_WRAPPER(NotifyNumConnectionsChanged, void, int newNumConnections);
|
ADD_SIGNALS_DECL_WRAPPER(NotifyNumConnectionsChanged, void, int newNumConnections);
|
||||||
|
|
||||||
@ -128,4 +131,4 @@ constexpr auto AbortError = InitError;
|
|||||||
|
|
||||||
extern CClientUIInterface uiInterface;
|
extern CClientUIInterface uiInterface;
|
||||||
|
|
||||||
#endif // BITCOIN_NODE_UI_INTERFACE_H
|
#endif // BITCOIN_NODE_INTERFACE_UI_H
|
@ -30,7 +30,7 @@
|
|||||||
#include <node/blockstorage.h>
|
#include <node/blockstorage.h>
|
||||||
#include <node/coin.h>
|
#include <node/coin.h>
|
||||||
#include <node/context.h>
|
#include <node/context.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <node/transaction.h>
|
#include <node/transaction.h>
|
||||||
#include <policy/feerate.h>
|
#include <policy/feerate.h>
|
||||||
#include <policy/fees.h>
|
#include <policy/fees.h>
|
||||||
@ -527,6 +527,10 @@ public:
|
|||||||
{
|
{
|
||||||
return MakeHandler(::uiInterface.ShowProgress_connect(fn));
|
return MakeHandler(::uiInterface.ShowProgress_connect(fn));
|
||||||
}
|
}
|
||||||
|
std::unique_ptr<Handler> handleInitWallet(InitWalletFn fn) override
|
||||||
|
{
|
||||||
|
return MakeHandler(::uiInterface.InitWallet_connect(fn));
|
||||||
|
}
|
||||||
std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) override
|
std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) override
|
||||||
{
|
{
|
||||||
return MakeHandler(::uiInterface.NotifyNumConnectionsChanged_connect(fn));
|
return MakeHandler(::uiInterface.NotifyNumConnectionsChanged_connect(fn));
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <noui.h>
|
#include <noui.h>
|
||||||
|
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <node/context.h>
|
#include <node/context.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <noui.h>
|
#include <noui.h>
|
||||||
#include <qt/bitcoingui.h>
|
#include <qt/bitcoingui.h>
|
||||||
#include <qt/clientmodel.h>
|
#include <qt/clientmodel.h>
|
||||||
@ -44,6 +44,7 @@
|
|||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
|
||||||
#include <boost/signals2/connection.hpp>
|
#include <boost/signals2/connection.hpp>
|
||||||
|
#include <chrono>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@ -262,7 +263,6 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
|
|||||||
// We don't hold a direct pointer to the splash screen after creation, but the splash
|
// We don't hold a direct pointer to the splash screen after creation, but the splash
|
||||||
// screen will take care of deleting itself when finish() happens.
|
// screen will take care of deleting itself when finish() happens.
|
||||||
m_splash->show();
|
m_splash->show();
|
||||||
connect(this, &BitcoinApplication::requestedInitialize, m_splash, &SplashScreen::handleLoadWallet);
|
|
||||||
connect(this, &BitcoinApplication::splashFinished, m_splash, &SplashScreen::finish);
|
connect(this, &BitcoinApplication::splashFinished, m_splash, &SplashScreen::finish);
|
||||||
connect(this, &BitcoinApplication::requestedShutdown, m_splash, &QWidget::close);
|
connect(this, &BitcoinApplication::requestedShutdown, m_splash, &QWidget::close);
|
||||||
}
|
}
|
||||||
@ -398,10 +398,10 @@ void BitcoinApplication::initializeResult(bool success, interfaces::BlockAndHead
|
|||||||
connect(paymentServer, &PaymentServer::message, [this](const QString& title, const QString& message, unsigned int style) {
|
connect(paymentServer, &PaymentServer::message, [this](const QString& title, const QString& message, unsigned int style) {
|
||||||
window->message(title, message, style);
|
window->message(title, message, style);
|
||||||
});
|
});
|
||||||
QTimer::singleShot(100, paymentServer, &PaymentServer::uiReady);
|
QTimer::singleShot(100ms, paymentServer, &PaymentServer::uiReady);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pollShutdownTimer->start(200);
|
pollShutdownTimer->start(SHUTDOWN_POLLING_DELAY);
|
||||||
} else {
|
} else {
|
||||||
Q_EMIT splashFinished(); // Make sure splash screen doesn't stick around during shutdown
|
Q_EMIT splashFinished(); // Make sure splash screen doesn't stick around during shutdown
|
||||||
quit(); // Exit first main loop invocation
|
quit(); // Exit first main loop invocation
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <interfaces/coinjoin.h>
|
#include <interfaces/coinjoin.h>
|
||||||
#include <interfaces/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <qt/governancelist.h>
|
#include <qt/governancelist.h>
|
||||||
#include <qt/masternodelist.h>
|
#include <qt/masternodelist.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <netbase.h>
|
#include <netbase.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
#include <util/threadnames.h>
|
#include <util/threadnames.h>
|
||||||
|
#include <util/time.h>
|
||||||
#include <validation.h>
|
#include <validation.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -323,7 +324,7 @@ static void BlockTipChanged(ClientModel* clientmodel, SynchronizationState sync_
|
|||||||
const bool throttle = (sync_state != SynchronizationState::POST_INIT && !fHeader) || sync_state == SynchronizationState::INIT_REINDEX;
|
const bool throttle = (sync_state != SynchronizationState::POST_INIT && !fHeader) || sync_state == SynchronizationState::INIT_REINDEX;
|
||||||
const int64_t now = throttle ? GetTimeMillis() : 0;
|
const int64_t now = throttle ? GetTimeMillis() : 0;
|
||||||
int64_t& nLastUpdateNotification = fHeader ? nLastHeaderTipUpdateNotification : nLastBlockTipUpdateNotification;
|
int64_t& nLastUpdateNotification = fHeader ? nLastHeaderTipUpdateNotification : nLastBlockTipUpdateNotification;
|
||||||
if (throttle && now < nLastUpdateNotification + MODEL_UPDATE_DELAY) {
|
if (throttle && now < nLastUpdateNotification + count_milliseconds(MODEL_UPDATE_DELAY)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,10 +6,16 @@
|
|||||||
#ifndef BITCOIN_QT_GUICONSTANTS_H
|
#ifndef BITCOIN_QT_GUICONSTANTS_H
|
||||||
#define BITCOIN_QT_GUICONSTANTS_H
|
#define BITCOIN_QT_GUICONSTANTS_H
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
/* Milliseconds between model updates */
|
using namespace std::chrono_literals;
|
||||||
static const int MODEL_UPDATE_DELAY = 250;
|
|
||||||
|
/* A delay between model updates */
|
||||||
|
static constexpr auto MODEL_UPDATE_DELAY{250ms};
|
||||||
|
|
||||||
|
/* A delay between shutdown pollings */
|
||||||
|
static constexpr auto SHUTDOWN_POLLING_DELAY{200ms};
|
||||||
|
|
||||||
/* AskPassphraseDialog -- Maximum passphrase length */
|
/* AskPassphraseDialog -- Maximum passphrase length */
|
||||||
static const int MAX_PASSPHRASE_SIZE = 1024;
|
static const int MAX_PASSPHRASE_SIZE = 1024;
|
||||||
|
@ -29,9 +29,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <qt/bitcoin.h>
|
#include <qt/bitcoin.h>
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
#include <util/url.h>
|
#include <util/url.h>
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include <util/underlying.h>
|
#include <util/underlying.h>
|
||||||
|
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <QDataWidgetMapper>
|
#include <QDataWidgetMapper>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QIntValidator>
|
#include <QIntValidator>
|
||||||
@ -457,7 +459,7 @@ void OptionsDialog::showRestartWarning(bool fPersistent)
|
|||||||
ui->statusLabel->setText(tr("This change would require a client restart."));
|
ui->statusLabel->setText(tr("This change would require a client restart."));
|
||||||
// clear non-persistent status label after 10 seconds
|
// clear non-persistent status label after 10 seconds
|
||||||
// Todo: should perhaps be a class attribute, if we extend the use of statusLabel
|
// Todo: should perhaps be a class attribute, if we extend the use of statusLabel
|
||||||
QTimer::singleShot(10000, this, &OptionsDialog::clearStatusLabel);
|
QTimer::singleShot(10s, this, &OptionsDialog::clearStatusLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
|
||||||
|
@ -21,13 +21,14 @@
|
|||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <policy/fees.h>
|
#include <policy/fees.h>
|
||||||
#include <txmempool.h>
|
#include <txmempool.h>
|
||||||
|
#include <validation.h>
|
||||||
#include <wallet/coincontrol.h>
|
#include <wallet/coincontrol.h>
|
||||||
#include <wallet/fees.h>
|
#include <wallet/fees.h>
|
||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
#include <validation.h>
|
#include <chrono>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -1080,7 +1081,7 @@ SendConfirmationDialog::SendConfirmationDialog(const QString& title, const QStri
|
|||||||
int SendConfirmationDialog::exec()
|
int SendConfirmationDialog::exec()
|
||||||
{
|
{
|
||||||
updateYesButton();
|
updateYesButton();
|
||||||
countDownTimer.start(1000);
|
countDownTimer.start(1s);
|
||||||
return QMessageBox::exec();
|
return QMessageBox::exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,6 +199,7 @@ void SplashScreen::subscribeToCoreSignals()
|
|||||||
// Connect signals to client
|
// Connect signals to client
|
||||||
m_handler_init_message = m_node->handleInitMessage(std::bind(InitMessage, this, std::placeholders::_1));
|
m_handler_init_message = m_node->handleInitMessage(std::bind(InitMessage, this, std::placeholders::_1));
|
||||||
m_handler_show_progress = m_node->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
m_handler_show_progress = m_node->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
|
m_handler_init_wallet = m_node->handleInitWallet([this]() { handleLoadWallet(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void SplashScreen::handleLoadWallet()
|
void SplashScreen::handleLoadWallet()
|
||||||
|
@ -66,6 +66,7 @@ private:
|
|||||||
bool m_shutdown = false;
|
bool m_shutdown = false;
|
||||||
std::unique_ptr<interfaces::Handler> m_handler_init_message;
|
std::unique_ptr<interfaces::Handler> m_handler_init_message;
|
||||||
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||||
|
std::unique_ptr<interfaces::Handler> m_handler_init_wallet;
|
||||||
std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
|
std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
|
||||||
std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
|
std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
|
||||||
std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
|
std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
#include <walletinitinterface.h>
|
#include <walletinitinterface.h>
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@ -39,7 +41,7 @@ void EditAddressAndSubmit(
|
|||||||
dialog->findChild<QLineEdit*>("labelEdit")->setText(label);
|
dialog->findChild<QLineEdit*>("labelEdit")->setText(label);
|
||||||
dialog->findChild<QValidatedLineEdit*>("addressEdit")->setText(address);
|
dialog->findChild<QValidatedLineEdit*>("addressEdit")->setText(address);
|
||||||
|
|
||||||
ConfirmMessage(&warning_text, 5);
|
ConfirmMessage(&warning_text, 5ms);
|
||||||
dialog->accept();
|
dialog->accept();
|
||||||
QCOMPARE(warning_text, expected_msg);
|
QCOMPARE(warning_text, expected_msg);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
@ -9,7 +11,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
void ConfirmMessage(QString* text, int msec)
|
void ConfirmMessage(QString* text, std::chrono::milliseconds msec)
|
||||||
{
|
{
|
||||||
QTimer::singleShot(msec, [text]() {
|
QTimer::singleShot(msec, [text]() {
|
||||||
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
#ifndef BITCOIN_QT_TEST_UTIL_H
|
#ifndef BITCOIN_QT_TEST_UTIL_H
|
||||||
#define BITCOIN_QT_TEST_UTIL_H
|
#define BITCOIN_QT_TEST_UTIL_H
|
||||||
|
|
||||||
#include <QString>
|
#include <chrono>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QString;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Press "Ok" button in message box dialog.
|
* Press "Ok" button in message box dialog.
|
||||||
@ -13,6 +17,6 @@
|
|||||||
* @param text - Optionally store dialog text.
|
* @param text - Optionally store dialog text.
|
||||||
* @param msec - Number of milliseconds to pause before triggering the callback.
|
* @param msec - Number of milliseconds to pause before triggering the callback.
|
||||||
*/
|
*/
|
||||||
void ConfirmMessage(QString* text = nullptr, int msec = 0);
|
void ConfirmMessage(QString* text, std::chrono::milliseconds msec);
|
||||||
|
|
||||||
#endif // BITCOIN_QT_TEST_UTIL_H
|
#endif // BITCOIN_QT_TEST_UTIL_H
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <qt/recentrequeststablemodel.h>
|
#include <qt/recentrequeststablemodel.h>
|
||||||
#include <qt/receiverequestdialog.h>
|
#include <qt/receiverequestdialog.h>
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include <QCalendarWidget>
|
#include <QCalendarWidget>
|
||||||
|
#include <chrono>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QDateTimeEdit>
|
#include <QDateTimeEdit>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
@ -114,8 +115,8 @@ TransactionView::TransactionView(QWidget* parent) :
|
|||||||
amountWidget->setObjectName("amountWidget");
|
amountWidget->setObjectName("amountWidget");
|
||||||
hlayout->addWidget(amountWidget);
|
hlayout->addWidget(amountWidget);
|
||||||
|
|
||||||
// Delay before filtering transactions in ms
|
// Delay before filtering transactions
|
||||||
static const int input_filter_delay = 200;
|
static constexpr auto input_filter_delay{200ms};
|
||||||
|
|
||||||
QTimer* amount_typing_delay = new QTimer(this);
|
QTimer* amount_typing_delay = new QTimer(this);
|
||||||
amount_typing_delay->setSingleShot(true);
|
amount_typing_delay->setSingleShot(true);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@ -271,12 +272,12 @@ void CreateWalletActivity::createWallet()
|
|||||||
flags |= WALLET_FLAG_DESCRIPTORS;
|
flags |= WALLET_FLAG_DESCRIPTORS;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTimer::singleShot(500, worker(), [this, name, flags] {
|
QTimer::singleShot(500ms, worker(), [this, name, flags] {
|
||||||
std::unique_ptr<interfaces::Wallet> wallet = node().walletLoader().createWallet(name, m_passphrase, flags, m_error_message, m_warning_message);
|
std::unique_ptr<interfaces::Wallet> wallet = node().walletLoader().createWallet(name, m_passphrase, flags, m_error_message, m_warning_message);
|
||||||
|
|
||||||
if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet));
|
if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet));
|
||||||
|
|
||||||
QTimer::singleShot(500, this, &CreateWalletActivity::finish);
|
QTimer::singleShot(500ms, this, &CreateWalletActivity::finish);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <qt/walletframe.h>
|
#include <qt/walletframe.h>
|
||||||
|
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <psbt.h>
|
#include <psbt.h>
|
||||||
#include <qt/governancelist.h>
|
#include <qt/governancelist.h>
|
||||||
#include <qt/guiutil.h>
|
#include <qt/guiutil.h>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <interfaces/handler.h>
|
#include <interfaces/handler.h>
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <psbt.h>
|
#include <psbt.h>
|
||||||
#include <util/system.h> // for GetBoolArg
|
#include <util/system.h> // for GetBoolArg
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <qt/walletmodel.h>
|
#include <qt/walletmodel.h>
|
||||||
|
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
@ -9,24 +9,23 @@
|
|||||||
#include <crypto/chacha20.h>
|
#include <crypto/chacha20.h>
|
||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
#include <crypto/sha512.h>
|
#include <crypto/sha512.h>
|
||||||
#include <support/cleanse.h>
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <compat.h> // for Windows API
|
|
||||||
#include <wincrypt.h>
|
|
||||||
#endif
|
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <randomenv.h>
|
#include <randomenv.h>
|
||||||
#include <support/allocators/secure.h>
|
|
||||||
#include <span.h>
|
#include <span.h>
|
||||||
#include <sync.h> // for Mutex
|
#include <support/allocators/secure.h>
|
||||||
#include <util/time.h> // for GetTimeMicros()
|
#include <support/cleanse.h>
|
||||||
|
#include <sync.h>
|
||||||
|
#include <util/time.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <wincrypt.h>
|
||||||
|
#else
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -729,7 +728,7 @@ bool Random_SanityCheck()
|
|||||||
* GetOSRand() overwrites all 32 bytes of the output given a maximum
|
* GetOSRand() overwrites all 32 bytes of the output given a maximum
|
||||||
* number of tries.
|
* number of tries.
|
||||||
*/
|
*/
|
||||||
static const ssize_t MAX_TRIES = 1024;
|
static constexpr int MAX_TRIES{1024};
|
||||||
uint8_t data[NUM_OS_RANDOM_BYTES];
|
uint8_t data[NUM_OS_RANDOM_BYTES];
|
||||||
bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */
|
bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */
|
||||||
int num_overwritten;
|
int num_overwritten;
|
||||||
|
@ -14,22 +14,23 @@
|
|||||||
#include <crypto/sha512.h>
|
#include <crypto/sha512.h>
|
||||||
#include <span.h>
|
#include <span.h>
|
||||||
#include <support/cleanse.h>
|
#include <support/cleanse.h>
|
||||||
#include <util/time.h> // for GetTime()
|
#include <util/time.h>
|
||||||
#ifdef WIN32
|
|
||||||
#include <compat.h> // for Windows API
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#ifndef WIN32
|
|
||||||
#include <sys/types.h> // must go before a number of other headers
|
#include <sys/types.h> // must go before a number of other headers
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <winreg.h>
|
||||||
|
#else
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
@ -365,6 +365,7 @@ static RPCHelpMan coinjoinsalt_set()
|
|||||||
}
|
}
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
|
||||||
|
// TODO: remove it completely
|
||||||
static RPCHelpMan getpoolinfo()
|
static RPCHelpMan getpoolinfo()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"getpoolinfo",
|
return RPCHelpMan{"getpoolinfo",
|
||||||
@ -469,7 +470,6 @@ void RegisterCoinJoinRPCCommands(CRPCTable &t)
|
|||||||
static const CRPCCommand commands[] =
|
static const CRPCCommand commands[] =
|
||||||
{ // category actor (function)
|
{ // category actor (function)
|
||||||
// --------------------- -----------------------
|
// --------------------- -----------------------
|
||||||
{ "dash", &getpoolinfo, },
|
|
||||||
{ "dash", &getcoinjoininfo, },
|
{ "dash", &getcoinjoininfo, },
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
{ "dash", &coinjoin, },
|
{ "dash", &coinjoin, },
|
||||||
@ -480,6 +480,8 @@ static const CRPCCommand commands[] =
|
|||||||
{ "dash", &coinjoinsalt_generate, },
|
{ "dash", &coinjoinsalt_generate, },
|
||||||
{ "dash", &coinjoinsalt_get, },
|
{ "dash", &coinjoinsalt_get, },
|
||||||
{ "dash", &coinjoinsalt_set, },
|
{ "dash", &coinjoinsalt_set, },
|
||||||
|
|
||||||
|
{ "hidden", &getpoolinfo, },
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
@ -134,6 +134,7 @@ static UniValue GetNextMasternodeForPayment(const CChain& active_chain, CDetermi
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: drop it
|
||||||
static RPCHelpMan masternode_winner()
|
static RPCHelpMan masternode_winner()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"masternode winner",
|
return RPCHelpMan{"masternode winner",
|
||||||
@ -154,6 +155,7 @@ static RPCHelpMan masternode_winner()
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: drop it
|
||||||
static RPCHelpMan masternode_current()
|
static RPCHelpMan masternode_current()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"masternode current",
|
return RPCHelpMan{"masternode current",
|
||||||
@ -227,7 +229,7 @@ static RPCHelpMan masternode_status()
|
|||||||
}
|
}
|
||||||
|
|
||||||
UniValue mnObj(UniValue::VOBJ);
|
UniValue mnObj(UniValue::VOBJ);
|
||||||
// keep compatibility with legacy status for now (might get deprecated/removed later)
|
// keep compatibility with legacy status for now (TODO: get deprecated/removed later)
|
||||||
mnObj.pushKV("outpoint", node.mn_activeman->GetOutPoint().ToStringShort());
|
mnObj.pushKV("outpoint", node.mn_activeman->GetOutPoint().ToStringShort());
|
||||||
mnObj.pushKV("service", node.mn_activeman->GetService().ToStringAddrPort());
|
mnObj.pushKV("service", node.mn_activeman->GetService().ToStringAddrPort());
|
||||||
auto dmn = CHECK_NONFATAL(node.dmnman)->GetListAtChainTip().GetMN(node.mn_activeman->GetProTxHash());
|
auto dmn = CHECK_NONFATAL(node.dmnman)->GetListAtChainTip().GetMN(node.mn_activeman->GetProTxHash());
|
||||||
@ -750,8 +752,8 @@ static const CRPCCommand commands[] =
|
|||||||
{ "dash", &masternode_status, },
|
{ "dash", &masternode_status, },
|
||||||
{ "dash", &masternode_payments, },
|
{ "dash", &masternode_payments, },
|
||||||
{ "dash", &masternode_winners, },
|
{ "dash", &masternode_winners, },
|
||||||
{ "dash", &masternode_current, },
|
{ "hidden", &masternode_current, },
|
||||||
{ "dash", &masternode_winner, },
|
{ "hidden", &masternode_winner, },
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
for (const auto& command : commands) {
|
for (const auto& command : commands) {
|
||||||
|
@ -241,7 +241,7 @@ static RPCHelpMan getpeerinfo()
|
|||||||
obj.pushKV("masternode", stats.m_masternode_connection);
|
obj.pushKV("masternode", stats.m_masternode_connection);
|
||||||
if (fStateStats) {
|
if (fStateStats) {
|
||||||
if (IsDeprecatedRPCEnabled("banscore")) {
|
if (IsDeprecatedRPCEnabled("banscore")) {
|
||||||
// banscore is deprecated in v21 for removal in v22
|
// TODO: banscore is deprecated in v21 for removal in v22, maybe impossible due to usages in p2p_quorum_data.py
|
||||||
obj.pushKV("banscore", statestats.m_misbehavior_score);
|
obj.pushKV("banscore", statestats.m_misbehavior_score);
|
||||||
}
|
}
|
||||||
obj.pushKV("startingheight", statestats.m_starting_height);
|
obj.pushKV("startingheight", statestats.m_starting_height);
|
||||||
@ -1126,10 +1126,10 @@ static const CRPCCommand commands[] =
|
|||||||
{ "network", &setban, },
|
{ "network", &setban, },
|
||||||
{ "network", &listbanned, },
|
{ "network", &listbanned, },
|
||||||
{ "network", &clearbanned, },
|
{ "network", &clearbanned, },
|
||||||
{ "network", &cleardiscouraged, },
|
|
||||||
{ "network", &setnetworkactive, },
|
{ "network", &setnetworkactive, },
|
||||||
{ "network", &getnodeaddresses, },
|
{ "network", &getnodeaddresses, },
|
||||||
|
|
||||||
|
{ "hidden", &cleardiscouraged, },
|
||||||
{ "hidden", &addconnection, },
|
{ "hidden", &addconnection, },
|
||||||
{ "hidden", &addpeeraddress, },
|
{ "hidden", &addpeeraddress, },
|
||||||
{ "hidden", &sendmsgtopeer },
|
{ "hidden", &sendmsgtopeer },
|
||||||
|
@ -874,29 +874,30 @@ static RPCHelpMan decoderawtransaction()
|
|||||||
|
|
||||||
static RPCHelpMan decodescript()
|
static RPCHelpMan decodescript()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"decodescript",
|
return RPCHelpMan{
|
||||||
"\nDecode a hex-encoded script.\n",
|
"decodescript",
|
||||||
{
|
"\nDecode a hex-encoded script.\n",
|
||||||
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"},
|
{
|
||||||
},
|
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"},
|
||||||
RPCResult{
|
},
|
||||||
RPCResult::Type::OBJ, "", "",
|
RPCResult{
|
||||||
|
RPCResult::Type::OBJ, "", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::STR, "asm", "Script public key"},
|
||||||
|
{RPCResult::Type::STR, "type", "The output type (e.g. " + GetAllOutputTypes() + ")"},
|
||||||
|
{RPCResult::Type::STR, "address", /* optional */ true, "Dash address (only if a well-defined address exists)"},
|
||||||
|
{RPCResult::Type::NUM, "reqSigs", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Number of required signatures"},
|
||||||
|
{RPCResult::Type::ARR, "addresses", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Array of Dash addresses",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::STR, "asm", "Script public key"},
|
{RPCResult::Type::STR, "address", "Dash address"},
|
||||||
{RPCResult::Type::STR, "type", "The output type (e.g. "+GetAllOutputTypes()+")"},
|
}},
|
||||||
{RPCResult::Type::STR, "address", /* optional */ true, "Dash address (only if a well-defined address exists)"},
|
{RPCResult::Type::STR, "p2sh", "address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)"},
|
||||||
{RPCResult::Type::NUM, "reqSigs", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Number of required signatures"},
|
},
|
||||||
{RPCResult::Type::ARR, "addresses", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Array of Dash addresses",
|
},
|
||||||
{
|
RPCExamples{
|
||||||
{RPCResult::Type::STR, "address", "Dash address"},
|
HelpExampleCli("decodescript", "\"hexstring\"")
|
||||||
}},
|
+ HelpExampleRpc("decodescript", "\"hexstring\"")
|
||||||
{RPCResult::Type::STR, "p2sh", "address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)"},
|
},
|
||||||
}
|
|
||||||
},
|
|
||||||
RPCExamples{
|
|
||||||
HelpExampleCli("decodescript", "\"hexstring\"")
|
|
||||||
+ HelpExampleRpc("decodescript", "\"hexstring\"")
|
|
||||||
},
|
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
RPCTypeCheck(request.params, {UniValue::VSTR});
|
RPCTypeCheck(request.params, {UniValue::VSTR});
|
||||||
@ -911,11 +912,10 @@ static RPCHelpMan decodescript()
|
|||||||
}
|
}
|
||||||
ScriptPubKeyToUniv(script, r, /* fIncludeHex */ false);
|
ScriptPubKeyToUniv(script, r, /* fIncludeHex */ false);
|
||||||
|
|
||||||
UniValue type;
|
std::vector<std::vector<unsigned char>> solutions_data;
|
||||||
|
const TxoutType which_type{Solver(script, solutions_data)};
|
||||||
|
|
||||||
type = find_value(r, "type");
|
if (which_type != TxoutType::SCRIPTHASH) {
|
||||||
|
|
||||||
if (type.isStr() && type.get_str() != "scripthash") {
|
|
||||||
// P2SH cannot be wrapped in a P2SH. If this script is already a P2SH,
|
// P2SH cannot be wrapped in a P2SH. If this script is already a P2SH,
|
||||||
// don't return the address for a P2SH of the P2SH.
|
// don't return the address for a P2SH of the P2SH.
|
||||||
r.pushKV("p2sh", EncodeDestination(ScriptHash(script)));
|
r.pushKV("p2sh", EncodeDestination(ScriptHash(script)));
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <util/tokenpipe.h>
|
#include <util/tokenpipe.h>
|
||||||
|
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <warnings.h>
|
#include <warnings.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef BITCOIN_STATS_RAWSENDER_H
|
#ifndef BITCOIN_STATS_RAWSENDER_H
|
||||||
#define BITCOIN_STATS_RAWSENDER_H
|
#define BITCOIN_STATS_RAWSENDER_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <threadinterrupt.h>
|
#include <threadinterrupt.h>
|
||||||
|
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/mman.h> // for mmap
|
#include <sys/mman.h> // for mmap
|
||||||
|
@ -450,6 +450,8 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
|
|||||||
peerLogic->Misbehaving(dummyNode.GetId(), DISCOURAGEMENT_THRESHOLD);
|
peerLogic->Misbehaving(dummyNode.GetId(), DISCOURAGEMENT_THRESHOLD);
|
||||||
BOOST_CHECK(peerLogic->SendMessages(&dummyNode));
|
BOOST_CHECK(peerLogic->SendMessages(&dummyNode));
|
||||||
BOOST_CHECK(banman->IsDiscouraged(addr));
|
BOOST_CHECK(banman->IsDiscouraged(addr));
|
||||||
|
banman->ClearDiscouraged();
|
||||||
|
BOOST_CHECK(!banman->IsDiscouraged(addr));
|
||||||
|
|
||||||
peerLogic->FinalizeNode(dummyNode);
|
peerLogic->FinalizeNode(dummyNode);
|
||||||
}
|
}
|
||||||
|
@ -461,7 +461,7 @@ ssize_t FuzzedFileProvider::write(void* cookie, const char* buf, size_t size)
|
|||||||
SetFuzzedErrNo(fuzzed_file->m_fuzzed_data_provider);
|
SetFuzzedErrNo(fuzzed_file->m_fuzzed_data_provider);
|
||||||
const ssize_t n = fuzzed_file->m_fuzzed_data_provider.ConsumeIntegralInRange<ssize_t>(0, size);
|
const ssize_t n = fuzzed_file->m_fuzzed_data_provider.ConsumeIntegralInRange<ssize_t>(0, size);
|
||||||
if (AdditionOverflow(fuzzed_file->m_offset, (int64_t)n)) {
|
if (AdditionOverflow(fuzzed_file->m_offset, (int64_t)n)) {
|
||||||
return fuzzed_file->m_fuzzed_data_provider.ConsumeBool() ? 0 : -1;
|
return 0;
|
||||||
}
|
}
|
||||||
fuzzed_file->m_offset += n;
|
fuzzed_file->m_offset += n;
|
||||||
return n;
|
return n;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <attributes.h>
|
#include <attributes.h>
|
||||||
#include <chainparamsbase.h>
|
#include <chainparamsbase.h>
|
||||||
#include <coins.h>
|
#include <coins.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <consensus/amount.h>
|
#include <consensus/amount.h>
|
||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <key.h>
|
#include <key.h>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <test/fuzz/FuzzedDataProvider.h>
|
#include <test/fuzz/FuzzedDataProvider.h>
|
||||||
#include <util/strencodings.h>
|
#include <util/strencodings.h>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <net_processing.h>
|
#include <net_processing.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <net_processing.h>
|
#include <net_processing.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <test/util/setup_common.h>
|
#include <test/util/setup_common.h>
|
||||||
#include <threadinterrupt.h>
|
#include <threadinterrupt.h>
|
||||||
#include <util/sock.h>
|
#include <util/sock.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#ifndef BITCOIN_TEST_UTIL_NET_H
|
#ifndef BITCOIN_TEST_UTIL_NET_H
|
||||||
#define BITCOIN_TEST_UTIL_NET_H
|
#define BITCOIN_TEST_UTIL_NET_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <net_permissions.h>
|
#include <net_permissions.h>
|
||||||
#include <net_processing.h>
|
#include <net_processing.h>
|
||||||
|
@ -37,9 +37,11 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <timedata.h>
|
#include <timedata.h>
|
||||||
|
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <chainparams.h>
|
#include <chainparams.h>
|
||||||
#include <chainparamsbase.h>
|
#include <chainparamsbase.h>
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <crypto/hmac_sha256.h>
|
#include <crypto/hmac_sha256.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netaddress.h>
|
#include <netaddress.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <txdb.h>
|
#include <txdb.h>
|
||||||
|
|
||||||
#include <chain.h>
|
#include <chain.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <pow.h>
|
#include <pow.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
#include <shutdown.h>
|
#include <shutdown.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#ifndef BITCOIN_UTIL_EDGE_H
|
#ifndef BITCOIN_UTIL_EDGE_H
|
||||||
#define BITCOIN_UTIL_EDGE_H
|
#define BITCOIN_UTIL_EDGE_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <threadinterrupt.h>
|
#include <threadinterrupt.h>
|
||||||
#include <tinyformat.h>
|
#include <tinyformat.h>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#ifndef BITCOIN_UTIL_SOCK_H
|
#ifndef BITCOIN_UTIL_SOCK_H
|
||||||
#define BITCOIN_UTIL_SOCK_H
|
#define BITCOIN_UTIL_SOCK_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <threadinterrupt.h>
|
#include <threadinterrupt.h>
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
|
|
||||||
|
@ -60,9 +60,6 @@
|
|||||||
#pragma warning(disable:4717)
|
#pragma warning(disable:4717)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
|
|
||||||
#include <io.h> /* for _commit */
|
#include <io.h> /* for _commit */
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <attributes.h>
|
#include <attributes.h>
|
||||||
#include <compat.h>
|
|
||||||
#include <compat/assumptions.h>
|
#include <compat/assumptions.h>
|
||||||
|
#include <compat/compat.h>
|
||||||
#include <consensus/amount.h>
|
#include <consensus/amount.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <config/bitcoin-config.h>
|
#include <config/bitcoin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
|
|
||||||
#include <util/check.h>
|
#include <util/check.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef BITCOIN_UTIL_TIME_H
|
#ifndef BITCOIN_UTIL_TIME_H
|
||||||
#define BITCOIN_UTIL_TIME_H
|
#define BITCOIN_UTIL_TIME_H
|
||||||
|
|
||||||
#include <compat.h>
|
#include <compat/compat.h>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <logging/timer.h>
|
#include <logging/timer.h>
|
||||||
#include <node/blockstorage.h>
|
#include <node/blockstorage.h>
|
||||||
#include <node/coinstats.h>
|
#include <node/coinstats.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <node/utxo_snapshot.h>
|
#include <node/utxo_snapshot.h>
|
||||||
#include <policy/policy.h>
|
#include <policy/policy.h>
|
||||||
#include <policy/settings.h>
|
#include <policy/settings.h>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
#include <compat/compat.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
#include <wallet/bdb.h>
|
#include <wallet/bdb.h>
|
||||||
#include <wallet/db.h>
|
#include <wallet/db.h>
|
||||||
@ -12,8 +13,15 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
// Windows may not define S_IRUSR or S_IWUSR. We define both
|
||||||
|
// here, with the same values as glibc (see stat.h).
|
||||||
|
#ifdef WIN32
|
||||||
|
#ifndef S_IRUSR
|
||||||
|
#define S_IRUSR 0400
|
||||||
|
#define S_IWUSR 0200
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <interfaces/wallet.h>
|
#include <interfaces/wallet.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <node/context.h>
|
#include <node/context.h>
|
||||||
#include <node/ui_interface.h>
|
#include <node/interface_ui.h>
|
||||||
#include <univalue.h>
|
#include <univalue.h>
|
||||||
#include <util/check.h>
|
#include <util/check.h>
|
||||||
#include <util/error.h>
|
#include <util/error.h>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user