Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
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#include <consensus/amount.h>
12
13namespace avalanche {
14class Processor;
15}
16
17class ArgsManager;
18
22static constexpr bool AVALANCHE_DEFAULT_ENABLED = true;
23
29
35 24 * 60 * 60;
36
40static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100;
41
47 int64_t(1'000'000'000'000) * SATOSHI; // 10B XEC
48
54 0.8;
55
61
63static constexpr bool DEFAULT_PERSIST_AVAPEERS{true};
64
66static constexpr bool DEFAULT_AVALANCHE_PRECONSENSUS{false};
67
69static constexpr bool DEFAULT_AVALANCHE_STAKING_PRECONSENSUS{false};
70
71#endif // BITCOIN_AVALANCHE_AVALANCHE_H
static constexpr Amount SATOSHI
Definition amount.h:143
static constexpr bool DEFAULT_PERSIST_AVAPEERS
Default for -persistavapeers.
Definition avalanche.h:63
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 quo...
Definition avalanche.h:53
static constexpr bool DEFAULT_AVALANCHE_STAKING_PRECONSENSUS
Default for -avalanchestakingpreconsensus.
Definition avalanche.h:69
static constexpr size_t AVALANCHE_DEFAULT_PEER_REPLACEMENT_COOLDOWN
Peer replacement cooldown time default value in seconds.
Definition avalanche.h:34
static constexpr double AVALANCHE_DEFAULT_MIN_AVAPROOFS_NODE_COUNT
Default minimum number of nodes that sent us an avaproofs message before we can consider our quorum s...
Definition avalanche.h:60
static constexpr bool DEFAULT_AVALANCHE_PRECONSENSUS
Default for -avalanchepreconsensus.
Definition avalanche.h:66
static constexpr Amount AVALANCHE_DEFAULT_MIN_QUORUM_STAKE
Default minimum cumulative stake of all known peers that constitutes a usable quorum.
Definition avalanche.h:46
static constexpr size_t AVALANCHE_DEFAULT_CONFLICTING_PROOF_COOLDOWN
Conflicting proofs cooldown time default value in seconds.
Definition avalanche.h:28
static constexpr bool AVALANCHE_DEFAULT_ENABLED
Is avalanche enabled by default.
Definition avalanche.h:22
static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN
Avalanche default cooldown in milliseconds.
Definition avalanche.h:40
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85