Bitcoin ABC 0.33.11
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;
17
18namespace avalanche {
19class Processor;
20}
21
23private:
29
30public:
32 const CBlockIndex &blockIndex, const CBlock &block,
33 const CTxMemPool *mempool,
34 const DisconnectedBlockTransactions *disconnectpool)
35 : m_avalanche(avalanche), m_block(block), m_blockIndex(blockIndex),
36 m_mempool(mempool), m_disconnectpool(disconnectpool) {}
37
38 bool operator()(BlockPolicyValidationState &state) override
40};
41
42#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:222
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
Definition: txmempool.h:316
const CBlockIndex & m_blockIndex
Definition: preconsensus.h:26
const CTxMemPool * m_mempool
Definition: preconsensus.h:27
const CBlock & m_block
Definition: preconsensus.h:25
const DisconnectedBlockTransactions * m_disconnectpool
Definition: preconsensus.h:28
bool operator()(BlockPolicyValidationState &state) override EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs)
const avalanche::Processor & m_avalanche
Definition: preconsensus.h:24
PreConsensusPolicy(const avalanche::Processor &avalanche, const CBlockIndex &blockIndex, const CBlock &block, const CTxMemPool *mempool, const DisconnectedBlockTransactions *disconnectpool)
Definition: preconsensus.h:31
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:56