Bitcoin ABC 0.32.4
P2P Digital Currency
preconsensus.h
Go to the documentation of this file.
1// Copyright (c) 2024 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_POLICY_BLOCK_PRECONSENSUS_H
6#define BITCOIN_POLICY_BLOCK_PRECONSENSUS_H
7
10#include <consensus/amount.h>
12#include <primitives/block.h>
13#include <txmempool.h>
14
15class CBlockIndex;
16
17namespace avalanche {
18class Processor;
19}
20
22private:
27
28public:
30 const CBlockIndex &blockIndex, const CBlock &block,
31 const CTxMemPool *mempool)
32 : m_avalanche(avalanche), m_block(block), m_blockIndex(blockIndex),
33 m_mempool(mempool) {}
34
35 bool operator()(BlockPolicyValidationState &state) override
37};
38
39#endif // BITCOIN_POLICY_BLOCK_PRECONSENSUS_H
Definition: block.h:60
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:25
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:221
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
Definition: txmempool.h:317
PreConsensusPolicy(const avalanche::Processor &avalanche, const CBlockIndex &blockIndex, const CBlock &block, const CTxMemPool *mempool)
Definition: preconsensus.h:29
const CBlockIndex & m_blockIndex
Definition: preconsensus.h:25
const CTxMemPool * m_mempool
Definition: preconsensus.h:26
const CBlock & m_block
Definition: preconsensus.h:24
bool operator()(BlockPolicyValidationState &state) override EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs)
const avalanche::Processor & m_avalanche
Definition: preconsensus.h:23
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:56