diff --git a/src/avalanche/avalanche.h b/src/avalanche/avalanche.h new file mode 100644 --- /dev/null +++ b/src/avalanche/avalanche.h @@ -0,0 +1,30 @@ +// Copyright (c) 2021 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_AVALANCHE_AVALANCHE_H +#define BITCOIN_AVALANCHE_AVALANCHE_H + +#include +#include + +namespace avalanche { +class Processor; +} + +/** + * Is avalanche enabled by default. + */ +static constexpr bool AVALANCHE_DEFAULT_ENABLED = false; + +/** + * Avalanche default cooldown in milliseconds. + */ +static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100; + +/** + * Global avalanche instance. + */ +extern std::unique_ptr g_avalanche; + +#endif // BITCOIN_AVALANCHE_AVALANCHE_H diff --git a/src/avalanche/processor.h b/src/avalanche/processor.h --- a/src/avalanche/processor.h +++ b/src/avalanche/processor.h @@ -36,11 +36,6 @@ using NodePeerManager = PeerManager; -/** - * Is avalanche enabled by default. - */ -static constexpr bool AVALANCHE_DEFAULT_ENABLED = false; - /** * Finalization score. */ @@ -50,10 +45,7 @@ * Maximum item that can be polled at once. */ static constexpr size_t AVALANCHE_MAX_ELEMENT_POLL = 16; -/** - * Avalanche default cooldown in milliseconds. - */ -static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100; + /** * How long before we consider that a query timed out. */ @@ -335,9 +327,4 @@ } // namespace avalanche -/** - * Global avalanche instance. - */ -extern std::unique_ptr g_avalanche; - #endif // BITCOIN_AVALANCHE_PROCESSOR_H diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/src/rpc/avalanche.cpp b/src/rpc/avalanche.cpp --- a/src/rpc/avalanche.cpp +++ b/src/rpc/avalanche.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include #include #include diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include