diff --git a/.travis.yml b/.travis.yml index 0b197be7598..6763029af76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,10 +39,10 @@ install: before_script: # Temporary workaround for https://github.com/bitcoin/bitcoin/issues/16368 - for i in {1..4}; do echo "$(sleep 500)" ; done & - - set -o errexit; source ./ci/test/05_before_script.sh &> "/dev/null" + - set -o errexit; source ./ci/test/05_before_script.sh script: - export CONTINUE=1 - - if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long + - if [ $SECONDS -gt 1800 ]; then export CONTINUE=0; fi # Likely the depends build took very long - if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # continue on repos with extended build time (90 minutes) - if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi - if [[ $SECONDS -gt 50*60-$EXPECTED_TESTS_DURATION_IN_SECONDS ]]; then export CONTINUE=0; fi diff --git a/src/Makefile.am b/src/Makefile.am index d275489d512..c38ef0e08ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -107,6 +107,7 @@ BITCOIN_CORE_H = \ addrdb.h \ addrman.h \ attributes.h \ + auxpow.h \ banman.h \ base58.h \ bech32.h \ @@ -185,10 +186,12 @@ BITCOIN_CORE_H = \ random.h \ randomenv.h \ reverse_iterator.h \ + rpc/auxpow_miner.h \ rpc/blockchain.h \ rpc/client.h \ rpc/mining.h \ rpc/protocol.h \ + rpc/rawtransaction.h \ rpc/rawtransaction_util.h \ rpc/register.h \ rpc/request.h \ @@ -317,6 +320,7 @@ libbitcoin_server_a_SOURCES = \ policy/settings.cpp \ pow.cpp \ rest.cpp \ + rpc/auxpow_miner.cpp \ rpc/blockchain.cpp \ rpc/mining.cpp \ rpc/misc.cpp \ @@ -489,6 +493,7 @@ libbitcoin_consensus_a_SOURCES = \ libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_common_a_SOURCES = \ + auxpow.cpp \ base58.cpp \ bech32.cpp \ bloom.cpp \ @@ -588,8 +593,10 @@ if TARGET_WINDOWS dogecoin_daemon_sources += bitcoind-res.rc endif +# FIXME: Remove SERVER once we have cleaned up getauxblock. dogecoin_bin_ldadd = \ $(LIBBITCOIN_WALLET) \ + $(LIBBITCOIN_SERVER) \ $(LIBBITCOIN_COMMON) \ $(LIBBITCOIN_UTIL) \ $(LIBUNIVALUE) \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 9902f53081f..fc2a0fe1a1c 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -214,6 +214,7 @@ BITCOIN_TESTS =\ test/addrman_tests.cpp \ test/amount_tests.cpp \ test/allocator_tests.cpp \ + test/auxpow_tests.cpp \ test/base32_tests.cpp \ test/base58_tests.cpp \ test/base64_tests.cpp \ diff --git a/src/auxpow.cpp b/src/auxpow.cpp new file mode 100644 index 00000000000..24b13ad5579 --- /dev/null +++ b/src/auxpow.cpp @@ -0,0 +1,215 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2011 Vince Durham +// Copyright (c) 2009-2014 The Bitcoin developers +// Copyright (c) 2014-2019 Daniel Kraft +// Distributed under the MIT/X11 software license, see the accompanying +// file license.txt or http://www.opensource.org/licenses/mit-license.php. + +#include + +#include +#include +#include +#include +#include