Bitcoin Core  24.99.0
P2P Digital Currency
Public Member Functions | List of all members
HeadersGeneratorSetup Struct Reference
Inheritance diagram for HeadersGeneratorSetup:
[legend]
Collaboration diagram for HeadersGeneratorSetup:
[legend]

Public Member Functions

void FindProofOfWork (CBlockHeader &starting_header)
 Search for a nonce to meet (regtest) proof of work. More...
 
void GenerateHeaders (std::vector< CBlockHeader > &headers, size_t count, const uint256 &starting_hash, const int nVersion, int prev_time, const uint256 &merkle_root, const uint32_t nBits)
 Generate headers in a chain that build off a given starting hash, using the given nVersion, advancing time by 1 second from the starting prev_time, and with a fixed merkle root hash. More...
 
- Public Member Functions inherited from RegTestingSetup
 RegTestingSetup ()
 
- Public Member Functions inherited from TestingSetup
 TestingSetup (const std::string &chainName=CBaseChainParams::MAIN, const std::vector< const char * > &extra_args={})
 
- Public Member Functions inherited from ChainTestingSetup
 ChainTestingSetup (const std::string &chainName=CBaseChainParams::MAIN, const std::vector< const char * > &extra_args={})
 
 ~ChainTestingSetup ()
 
- Public Member Functions inherited from BasicTestingSetup
 BasicTestingSetup (const std::string &chainName=CBaseChainParams::MAIN, const std::vector< const char * > &extra_args={})
 
 ~BasicTestingSetup ()
 

Additional Inherited Members

- Public Attributes inherited from ChainTestingSetup
node::CacheSizes m_cache_sizes {}
 
- Public Attributes inherited from BasicTestingSetup
node::NodeContext m_node
 
const fs::path m_path_root
 
ArgsManager m_args
 

Detailed Description

Definition at line 16 of file headers_sync_chainwork_tests.cpp.

Member Function Documentation

◆ FindProofOfWork()

void HeadersGeneratorSetup::FindProofOfWork ( CBlockHeader starting_header)

Search for a nonce to meet (regtest) proof of work.

Definition at line 29 of file headers_sync_chainwork_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateHeaders()

void HeadersGeneratorSetup::GenerateHeaders ( std::vector< CBlockHeader > &  headers,
size_t  count,
const uint256 starting_hash,
const int  nVersion,
int  prev_time,
const uint256 merkle_root,
const uint32_t  nBits 
)

Generate headers in a chain that build off a given starting hash, using the given nVersion, advancing time by 1 second from the starting prev_time, and with a fixed merkle root hash.

Definition at line 36 of file headers_sync_chainwork_tests.cpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: