Bitcoin ABC  0.29.1
P2P Digital Currency
statistics.h
Go to the documentation of this file.
1 // Copyright (c) 2023 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_STATISTICS_H
6 #define BITCOIN_AVALANCHE_STATISTICS_H
7 
8 #include <chrono>
9 
11 static constexpr std::chrono::minutes AVALANCHE_STATISTICS_REFRESH_PERIOD{10};
13 static constexpr std::chrono::minutes AVALANCHE_STATISTICS_TIME_CONSTANT{10};
18 static const double AVALANCHE_STATISTICS_DECAY_FACTOR =
19  1. - std::exp(-1. * AVALANCHE_STATISTICS_REFRESH_PERIOD.count() /
21 
22 #endif // BITCOIN_AVALANCHE_STATISTICS_H
static const double AVALANCHE_STATISTICS_DECAY_FACTOR
Pre-computed decay factor for the avalanche statistics computation.
Definition: statistics.h:18
static constexpr std::chrono::minutes AVALANCHE_STATISTICS_TIME_CONSTANT
Time constant for the avalanche statistics computation.
Definition: statistics.h:13
static constexpr std::chrono::minutes AVALANCHE_STATISTICS_REFRESH_PERIOD
Refresh period for the avalanche statistics computation.
Definition: statistics.h:11