Return a new block template when fees rise to a certain threshold or after a new tip; return nullopt if timeout is reached.
Synopsis
Declared in <node/miner.h>
std::unique_ptr<CBlockTemplate>
WaitAndCreateNewBlock(
ChainstateManager& chainman,
KernelNotifications& kernel_notifications,
CTxMemPool* mempool,
std::unique_ptr<CBlockTemplate> const& block_template,
BlockWaitOptions const& wait_options,
BlockCreateOptions const& create_options,
bool& interrupt_wait);
Return Value
A new block template, or nullptr if the timeout elapsed.
Parameters
Name |
Description |
chainman |
The chainstate manager to build on. |
kernel_notifications |
The notifications object used to wait for events. |
mempool |
The mempool to draw transactions from. |
block_template |
The previous template, used to compare fees. |
wait_options |
Options controlling how long to wait and the fee threshold. |
create_options |
Options controlling block‐template creation. |
interrupt_wait |
Flag that, when set, interrupts the wait. |
Created with MrDocs