Changeset View
Changeset View
Standalone View
Standalone View
src/parkingpresets.h
- This file was added.
// Copyright (c) 2023 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_PARKINGPRESETS_H | |||||
#define BITCOIN_PARKINGPRESETS_H | |||||
#include <consensus/amount.h> | |||||
#include <primitives/block.h> | |||||
#include <memory> | |||||
#include <vector> | |||||
class CBlockIndex; | |||||
namespace Consensus { | |||||
struct Params; | |||||
} | |||||
struct ParkingPreset { | |||||
virtual ~ParkingPreset() {} | |||||
virtual bool operator()() { return false; } | |||||
}; | |||||
struct MinerFundPolicy : ParkingPreset { | |||||
const CBlock &m_block; | |||||
const Amount &m_blockFees; | |||||
const Consensus::Params &m_consensusParams; | |||||
const CBlockIndex *m_pindex; | |||||
MinerFundPolicy(const Consensus::Params &consensusParams, | |||||
const CBlockIndex *pindex, const CBlock &block, | |||||
const Amount &blockFees) | |||||
: m_block(block), m_blockFees(blockFees), | |||||
m_consensusParams(consensusParams), m_pindex(pindex) {} | |||||
bool operator()() override; | |||||
}; | |||||
std::vector<std::shared_ptr<ParkingPreset>> | |||||
GetParkingPresetsForBlock(const Consensus::Params ¶ms, | |||||
const CBlockIndex *pindex, const CBlock &block, | |||||
const Amount &blockFees); | |||||
#endif // BITCOIN_PARKINGPRESETS_H |