From e73ab3f90fcd8bcb20727e2c324744cd4911c82a Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Fri, 10 Sep 2021 08:25:57 +0100 Subject: [PATCH] consensus: AuxPoW header Add the AuxPoW header to block storage, without yet adding code to mine or validate mined AuxPoW blocks. --- src/Makefile.am | 2 + src/auxpow.cpp | 216 +++++++++++++++++++++++++++++++++++++++ src/auxpow.h | 158 ++++++++++++++++++++++++++++ src/chain.cpp | 13 +++ src/primitives/block.cpp | 13 +++ src/primitives/block.h | 23 +++++ 6 files changed, 425 insertions(+) create mode 100644 src/auxpow.cpp create mode 100644 src/auxpow.h diff --git a/src/Makefile.am b/src/Makefile.am index d275489d5..df7cee91c 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 \ @@ -489,6 +490,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 \ diff --git a/src/auxpow.cpp b/src/auxpow.cpp new file mode 100644 index 000000000..eabe723e0 --- /dev/null +++ b/src/auxpow.cpp @@ -0,0 +1,216 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2011 Vince Durham +// Copyright (c) 2009-2014 The Bitcoin developers +// Copyright (c) 2014-2019 Daniel Kraft +// Copyright (c) 2021 The Dogecoin Core developers +// 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