Bitcoin ABC  0.24.7
P2P Digital Currency
avalanche.h
Go to the documentation of this file.
1 // Copyright (c) 2021 The Bitcoin developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_AVALANCHE_AVALANCHE_H
6 #define BITCOIN_AVALANCHE_AVALANCHE_H
7 
8 #include <cstddef>
9 #include <memory>
10 
11 namespace avalanche {
12 class Processor;
13 }
14 
15 class ArgsManager;
16 
20 static constexpr bool AVALANCHE_DEFAULT_ENABLED = false;
21 
25 static constexpr bool AVALANCHE_DEFAULT_PEER_DISCOVERY_ENABLED = false;
26 
30 static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100;
31 
35 extern std::unique_ptr<avalanche::Processor> g_avalanche;
36 
37 bool isAvalancheEnabled(const ArgsManager &argsman);
38 
39 #endif // BITCOIN_AVALANCHE_AVALANCHE_H
avalanche
Definition: avalanche.h:11
AVALANCHE_DEFAULT_COOLDOWN
static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN
Avalanche default cooldown in milliseconds.
Definition: avalanche.h:30
AVALANCHE_DEFAULT_PEER_DISCOVERY_ENABLED
static constexpr bool AVALANCHE_DEFAULT_PEER_DISCOVERY_ENABLED
Is avalanche peer discovery enabled by default.
Definition: avalanche.h:25
avalanche::Processor
Definition: processor.h:91
g_avalanche
std::unique_ptr< avalanche::Processor > g_avalanche
Global avalanche instance.
Definition: processor.cpp:31
AVALANCHE_DEFAULT_ENABLED
static constexpr bool AVALANCHE_DEFAULT_ENABLED
Is avalanche enabled by default.
Definition: avalanche.h:20
ArgsManager
Definition: system.h:152
isAvalancheEnabled
bool isAvalancheEnabled(const ArgsManager &argsman)
Definition: avalanche.cpp:9