Bitcoin ABC  0.26.3
P2P Digital Currency
Namespaces | Functions | Variables
avalanche.h File Reference
#include <cstddef>
#include <memory>
#include <consensus/amount.h>
Include dependency graph for avalanche.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 avalanche
 

Functions

bool isAvalancheEnabled (const ArgsManager &argsman)
 

Variables

static constexpr bool AVALANCHE_DEFAULT_ENABLED = true
 Is avalanche enabled by default. More...
 
static constexpr size_t AVALANCHE_DEFAULT_CONFLICTING_PROOF_COOLDOWN = 60
 Conflicting proofs cooldown time default value in seconds. More...
 
static constexpr size_t AVALANCHE_DEFAULT_PEER_REPLACEMENT_COOLDOWN
 Peer replacement cooldown time default value in seconds. More...
 
static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100
 Avalanche default cooldown in milliseconds. More...
 
static constexpr Amount AVALANCHE_DEFAULT_MIN_QUORUM_STAKE
 Default minimum cumulative stake of all known peers that constitutes a usable quorum. More...
 
static constexpr double AVALANCHE_DEFAULT_MIN_QUORUM_CONNECTED_STAKE_RATIO
 Default minimum percentage of stake-weighted peers we must have a node for to constitute a usable quorum. More...
 
static constexpr double AVALANCHE_DEFAULT_MIN_AVAPROOFS_NODE_COUNT = 8
 Default minimum number of nodes that sent us an avaproofs message before we can consider our quorum suitable for polling. More...
 
std::unique_ptr< avalanche::Processorg_avalanche
 Global avalanche instance. More...
 

Function Documentation

◆ isAvalancheEnabled()

bool isAvalancheEnabled ( const ArgsManager argsman)

Definition at line 9 of file avalanche.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ AVALANCHE_DEFAULT_CONFLICTING_PROOF_COOLDOWN

constexpr size_t AVALANCHE_DEFAULT_CONFLICTING_PROOF_COOLDOWN = 60
staticconstexpr

Conflicting proofs cooldown time default value in seconds.

Minimal delay between two proofs with at least a common UTXO.

Definition at line 28 of file avalanche.h.

◆ AVALANCHE_DEFAULT_COOLDOWN

constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100
staticconstexpr

Avalanche default cooldown in milliseconds.

Definition at line 40 of file avalanche.h.

◆ AVALANCHE_DEFAULT_ENABLED

constexpr bool AVALANCHE_DEFAULT_ENABLED = true
staticconstexpr

Is avalanche enabled by default.

Definition at line 22 of file avalanche.h.

◆ AVALANCHE_DEFAULT_MIN_AVAPROOFS_NODE_COUNT

constexpr double AVALANCHE_DEFAULT_MIN_AVAPROOFS_NODE_COUNT = 8
staticconstexpr

Default minimum number of nodes that sent us an avaproofs message before we can consider our quorum suitable for polling.

Definition at line 60 of file avalanche.h.

◆ AVALANCHE_DEFAULT_MIN_QUORUM_CONNECTED_STAKE_RATIO

constexpr double AVALANCHE_DEFAULT_MIN_QUORUM_CONNECTED_STAKE_RATIO
staticconstexpr
Initial value:
=
0.8

Default minimum percentage of stake-weighted peers we must have a node for to constitute a usable quorum.

Definition at line 53 of file avalanche.h.

◆ AVALANCHE_DEFAULT_MIN_QUORUM_STAKE

constexpr Amount AVALANCHE_DEFAULT_MIN_QUORUM_STAKE
staticconstexpr
Initial value:
=
int64_t(1'000'000'000'000) * SATOSHI
static constexpr Amount SATOSHI
Definition: amount.h:153

Default minimum cumulative stake of all known peers that constitutes a usable quorum.

Definition at line 46 of file avalanche.h.

◆ AVALANCHE_DEFAULT_PEER_REPLACEMENT_COOLDOWN

constexpr size_t AVALANCHE_DEFAULT_PEER_REPLACEMENT_COOLDOWN
staticconstexpr
Initial value:
=
24 * 60 * 60

Peer replacement cooldown time default value in seconds.

Minimal delay before a peer can be replaced due to a conflicting proof.

Definition at line 34 of file avalanche.h.

◆ g_avalanche

std::unique_ptr<avalanche::Processor> g_avalanche
extern

Global avalanche instance.

Definition at line 35 of file processor.cpp.