diff --git a/src/Makefile.am b/src/Makefile.am index 16f7b56272d..fd6b02d8dc3 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,6 +186,7 @@ BITCOIN_CORE_H = \ random.h \ randomenv.h \ reverse_iterator.h \ + rpc/auxpow_miner.h \ rpc/blockchain.h \ rpc/client.h \ rpc/mining.h \ @@ -317,6 +319,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 \ @@ -463,6 +466,8 @@ libbitcoin_consensus_a_SOURCES = \ prevector.h \ primitives/block.cpp \ primitives/block.h \ + primitives/pureheader.cpp \ + primitives/pureheader.h \ primitives/transaction.cpp \ primitives/transaction.h \ pubkey.cpp \ @@ -487,6 +492,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 \ @@ -586,8 +592,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 4614179879b..1f5af956181 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -213,6 +213,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