Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/postconsensus.h
- This file was added.
// Copyright (c) 2022 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_POSTCONSENSUS_H | |||||
#define BITCOIN_AVALANCHE_POSTCONSENSUS_H | |||||
#include <cstdint> | |||||
/** | |||||
* Parameters and defaults for Avalanche post-consensus policies. | |||||
*/ | |||||
class ArgsManager; | |||||
class CChainParams; | |||||
namespace avalanche { | |||||
/** | |||||
* Is early block penalty enabled by default? | |||||
*/ | |||||
static constexpr bool EARLY_BLOCK_PENALTY_DEFAULT_ENABLED = false; | |||||
static constexpr int64_t EARLY_BLOCK_PENALTY_FACTOR_DEFAULT = 10; | |||||
static constexpr int64_t EARLY_BLOCK_PENALTY_WINDOW_DEFAULT = 2 * 60; | |||||
bool isEarlyBlockPenaltyEnabled(const ArgsManager &argsman); | |||||
int64_t getEarlyBlockPenaltyFactor(const ArgsManager &argsman, | |||||
const CChainParams &chainparams); | |||||
int64_t getEarlyBlockPenaltyWindow(const ArgsManager &argsman, | |||||
const CChainParams &chainparams); | |||||
} // namespace avalanche | |||||
#endif // BITCOIN_AVALANCHE_POSTCONSENSUS_H |