Bitcoin ABC 0.30.5
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
8#include <consensus/amount.h>
10#include <primitives/block.h>
11#include <txmempool.h>
12
13class CBlockIndex;
14
16private:
20
21public:
22 PreConsensusPolicy(const CBlockIndex &blockIndex, const CBlock &block,
23 const CTxMemPool *mempool)
24 : m_block(block), m_blockIndex(blockIndex), m_mempool(mempool) {}
25
26 bool operator()(BlockPolicyValidationState &state) override
28};
29
30#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:212
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
Definition: txmempool.h:307
const CBlockIndex & m_blockIndex
Definition: preconsensus.h:18
const CTxMemPool * m_mempool
Definition: preconsensus.h:19
const CBlock & m_block
Definition: preconsensus.h:17
bool operator()(BlockPolicyValidationState &state) override EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs)
PreConsensusPolicy(const CBlockIndex &blockIndex, const CBlock &block, const CTxMemPool *mempool)
Definition: preconsensus.h:22
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:56