mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge pull request #4866 from Munkybooty/backports-0.20-pr4
Backports 0.20 pr4
This commit is contained in:
commit
d89de3a2fa
@ -54,6 +54,8 @@ builddocker: &builddocker
|
||||
# no need to run tests again here
|
||||
- if [ "$DOCKER_BUILD" = "true" ]; then $DOCKER_RUN_IN_BUILDER ./ci/dash/build_depends.sh && $DOCKER_RUN_IN_BUILDER ./ci/dash/build_src.sh && BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./ci/dash/build-docker.sh; fi
|
||||
- CI_RETRY_EXE="travis_retry"
|
||||
- CI_WAIT="while sleep 500; do echo .; done"
|
||||
- CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. See https://docs.travis-ci.com/user/customizing-the-build#build-timeouts . Please manually re-run this job by using the travis restart button. The next run should not time out because the build cache has been saved."
|
||||
before_install:
|
||||
- set -o errexit; source ./ci/test/00_setup_env.sh
|
||||
- set -o errexit; source ./ci/test/03_before_install.sh
|
||||
|
15
ci/README.md
15
ci/README.md
@ -8,11 +8,21 @@ and numbered according to which stage and lifecycle step it belongs to.
|
||||
|
||||
### Running a stage locally
|
||||
|
||||
Be aware that the tests will be built and run in-place, so please run at your own risk.
|
||||
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
|
||||
|
||||
The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory.
|
||||
While most of the actions are done inside a docker container, this is not possible for all. Thus, cache directories,
|
||||
such as the depends cache or ccache, are mounted as read-write into the docker container. While it should be fine to run
|
||||
the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and
|
||||
testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci
|
||||
system in a virtual machine with a Linux operating system of your choice.
|
||||
|
||||
To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
|
||||
requires `docker` to be installed. To install all requirements on Ubuntu, run
|
||||
|
||||
```
|
||||
sudo apt install docker.io bash git
|
||||
sudo apt install docker.io bash
|
||||
```
|
||||
|
||||
To run the default test stage,
|
||||
@ -26,6 +36,3 @@ To run the test stage with a specific configuration,
|
||||
```
|
||||
FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
|
||||
```
|
||||
|
||||
Be aware that the tests will be build and run in-place, so please run at your own risk.
|
||||
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
|
||||
|
@ -41,7 +41,7 @@ export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_ROOT_DIR}
|
||||
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_BUILD_DIR/out/$HOST}
|
||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||
export WINEDEBUG=${WINEDEBUG:-fixme-all}
|
||||
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3}
|
||||
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git}
|
||||
export GOAL=${GOAL:-install}
|
||||
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_BUILD_DIR}/qa-assets}
|
||||
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
|
||||
|
@ -7,7 +7,7 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_BENCH=true
|
||||
export GOAL="install"
|
||||
|
@ -7,7 +7,7 @@
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export PACKAGES="clang llvm python3 libssl1.0-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev"
|
||||
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=false
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DOCKER_NAME_TAG=ubuntu:14.04
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libssl-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
export GOAL="install"
|
||||
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no"
|
||||
|
@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=x86_64-unknown-linux-gnu
|
||||
export DOCKER_NAME_TAG=ubuntu:16.04
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl-dev libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_FUNCTIONAL_TESTS=false # Disabled for now. TODO identify suppressions or exclude specific tests
|
||||
export GOAL="install"
|
||||
|
@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
||||
|
||||
export HOST=s390x-unknown-linux-gnu
|
||||
export DOCKER_NAME_TAG=s390x/ubuntu:18.04
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
||||
export NO_DEPENDS=1
|
||||
export RUN_UNIT_TESTS=true
|
||||
export RUN_FUNCTIONAL_TESTS=false
|
||||
|
@ -9,12 +9,6 @@ export LC_ALL=C.UTF-8
|
||||
mkdir -p "${BASE_SCRATCH_DIR}"
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
|
||||
if [ ! -d ${DIR_QA_ASSETS} ]; then
|
||||
git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
|
||||
fi
|
||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
|
||||
|
||||
mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
|
||||
export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan"
|
||||
export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
|
||||
env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
|
||||
@ -28,7 +22,13 @@ if [ -z "$RUN_CI_ON_HOST" ]; then
|
||||
echo "Creating $DOCKER_NAME_TAG container to run in"
|
||||
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
|
||||
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$BASE_BUILD_DIR,dst=$BASE_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $BASE_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt \
|
||||
--mount type=bind,src=$BASE_BUILD_DIR,dst=/ro_base,readonly \
|
||||
--mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \
|
||||
--mount type=bind,src=$BASE_BUILD_DIR/depends,dst=$BASE_BUILD_DIR/depends \
|
||||
-w $BASE_BUILD_DIR \
|
||||
--env-file /tmp/env \
|
||||
$DOCKER_NAME_TAG)
|
||||
|
||||
DOCKER_EXEC () {
|
||||
docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $PWD && $*"
|
||||
@ -51,6 +51,18 @@ fi
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
|
||||
|
||||
if [ ! -d ${DIR_QA_ASSETS} ]; then
|
||||
DOCKER_EXEC git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
|
||||
fi
|
||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
|
||||
|
||||
DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
|
||||
|
||||
if [ -z "$RUN_CI_ON_HOST" ]; then
|
||||
echo "Create $BASE_BUILD_DIR"
|
||||
DOCKER_EXEC rsync -a /ro_base/ $BASE_BUILD_DIR
|
||||
fi
|
||||
|
||||
if [ "$USE_BUSY_BOX" = "true" ]; then
|
||||
echo "Setup to use BusyBox utils"
|
||||
DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/
|
||||
|
@ -10,7 +10,7 @@ DOCKER_EXEC echo \> \$HOME/.dashcore # Make sure default datadir does not exist
|
||||
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}"
|
||||
|
||||
mkdir -p depends/SDKs depends/sdk-sources
|
||||
DOCKER_EXEC mkdir -p depends/SDKs depends/sdk-sources
|
||||
|
||||
if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then
|
||||
DOCKER_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
|
||||
|
@ -4,7 +4,7 @@ FROM ubuntu:focal
|
||||
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
|
||||
|
||||
# Build and base stuff
|
||||
# (zlib1g-dev and libssl-dev are 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"
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN apt-get update && apt-get install $APT_ARGS \
|
||||
@ -23,7 +23,6 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
||||
wget \
|
||||
unzip \
|
||||
libtool \
|
||||
libssl-dev \
|
||||
m4 \
|
||||
pkg-config \
|
||||
python3 \
|
||||
|
@ -9,7 +9,6 @@ Build-Depends: debhelper,
|
||||
libtool,
|
||||
bash-completion,
|
||||
libdb4.8++-dev,
|
||||
libssl-dev,
|
||||
pkg-config,
|
||||
libevent-dev,
|
||||
libboost-filesystem1.48-dev | libboost-filesystem-dev (>> 1.47),
|
||||
|
@ -8,4 +8,3 @@ Description: Library for the Bitcoin consensus protocol.
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -ldashconsensus
|
||||
Cflags: -I${includedir}
|
||||
Requires.private: libcrypto
|
||||
|
@ -6,11 +6,12 @@
|
||||
#define BITCOIN_CUCKOOCACHE_H
|
||||
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <algorithm> // std::find
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
/** Implements a drop-in replacement for std::vector<T> which stores up to N
|
||||
* elements directly (without heap allocation). The types Size and Diff are
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <net_types.h> // For banmap_t
|
||||
#include <qt/clientmodel.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
@ -47,7 +47,7 @@
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="reqLabel">
|
||||
<property name="toolTip">
|
||||
<string>An optional label to associate with the new receiving address.</string>
|
||||
<string>An optional label to associate with the new receiving address (used by you to identify an invoice). It is also attached to the payment request.</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Enter a label to associate with the new receiving address</string>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <interfaces/node.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
@ -11,8 +11,7 @@
|
||||
#include <clientversion.h>
|
||||
#include <streams.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <utility>
|
||||
|
||||
RecentRequestsTableModel::RecentRequestsTableModel(WalletModel *parent) :
|
||||
QAbstractTableModel(parent), walletModel(parent)
|
||||
@ -215,10 +214,10 @@ void RecentRequestsTableModel::updateDisplayUnit()
|
||||
updateAmountColumnTitle();
|
||||
}
|
||||
|
||||
bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
|
||||
bool RecentRequestEntryLessThan::operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const
|
||||
{
|
||||
RecentRequestEntry *pLeft = &left;
|
||||
RecentRequestEntry *pRight = &right;
|
||||
const RecentRequestEntry* pLeft = &left;
|
||||
const RecentRequestEntry* pRight = &right;
|
||||
if (order == Qt::DescendingOrder)
|
||||
std::swap(pLeft, pRight);
|
||||
|
||||
|
@ -35,7 +35,7 @@ class RecentRequestEntryLessThan
|
||||
public:
|
||||
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder):
|
||||
column(nColumn), order(fOrder) {}
|
||||
bool operator()(RecentRequestEntry &left, RecentRequestEntry &right) const;
|
||||
bool operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const;
|
||||
|
||||
private:
|
||||
int column;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <condition_variable>
|
||||
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(checkqueue_tests, TestingSetup)
|
||||
|
||||
|
@ -1232,17 +1232,13 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
||||
return fs::absolute(path, GetDataDir(net_specific));
|
||||
}
|
||||
|
||||
int ScheduleBatchPriority()
|
||||
void ScheduleBatchPriority()
|
||||
{
|
||||
#ifdef SCHED_BATCH
|
||||
const static sched_param param{};
|
||||
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m)) {
|
||||
if (pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m) != 0) {
|
||||
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -409,10 +409,8 @@ std::string CopyrightHolders(const std::string& strPrefix, unsigned int nStartYe
|
||||
* On platforms that support it, tell the kernel the calling thread is
|
||||
* CPU-intensive and non-interactive. See SCHED_BATCH in sched(7) for details.
|
||||
*
|
||||
* @return The return value of sched_setschedule(), or 1 on systems without
|
||||
* sched_setchedule().
|
||||
*/
|
||||
int ScheduleBatchPriority();
|
||||
void ScheduleBatchPriority();
|
||||
|
||||
namespace util {
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <serialize.h>
|
||||
#include <spentindex.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -58,7 +58,7 @@ void WalletInit::AddWalletOptions(ArgsManager& argsman) const
|
||||
argsman.AddArg("-wallet=<path>", "Specify wallet database path. Can be specified multiple times to load multiple wallets. Path is interpreted relative to <walletdir> if it is not absolute, and will be created if it does not exist (as a directory containing a wallet.dat file and log files). For backwards compatibility this will also accept names of existing data files in <walletdir>.)", ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::WALLET);
|
||||
argsman.AddArg("-walletbackupsdir=<dir>", "Specify full path to directory for automatic wallet backups (must exist)", ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
|
||||
argsman.AddArg("-walletbroadcast", strprintf("Make the wallet broadcast transactions (default: %u)", DEFAULT_WALLETBROADCAST), ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
|
||||
argsman.AddArg("-walletdir=<dir>", "Specify directory to hold wallets (default: <datadir>/wallets if it exists, otherwise <datadir>)", ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
|
||||
argsman.AddArg("-walletdir=<dir>", "Specify directory to hold wallets (default: <datadir>/wallets if it exists, otherwise <datadir>)", ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::WALLET);
|
||||
#if HAVE_SYSTEM
|
||||
argsman.AddArg("-walletnotify=<cmd>", "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)", ArgsManager::ALLOW_ANY, OptionsCategory::WALLET);
|
||||
#endif
|
||||
|
@ -3,7 +3,6 @@ leak:addCoin
|
||||
leak:bench_dash
|
||||
|
||||
# Suppress warnings triggered in dependencies
|
||||
leak:libcrypto
|
||||
leak:libqminimal
|
||||
leak:libQt5Core
|
||||
leak:libQt5Gui
|
||||
|
Loading…
Reference in New Issue
Block a user