![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
Block template interface. More...
#include <mining.h>
Public Member Functions | |
| virtual | ~BlockTemplate ()=default |
| virtual CBlockHeader | getBlockHeader ()=0 |
| virtual CBlock | getBlock ()=0 |
| virtual std::vector< CAmount > | getTxFees ()=0 |
| virtual std::vector< int64_t > | getTxSigops ()=0 |
| virtual node::CoinbaseTx | getCoinbaseTx ()=0 |
| Return fields needed to construct a coinbase transaction. | |
| virtual std::vector< uint256 > | getCoinbaseMerklePath ()=0 |
| Compute merkle path to the coinbase transaction. | |
| virtual bool | submitSolution (uint32_t version, uint32_t timestamp, uint32_t nonce, CTransactionRef coinbase)=0 |
| Construct and broadcast the block. | |
| virtual std::unique_ptr< BlockTemplate > | waitNext (node::BlockWaitOptions options={})=0 |
| Waits for fees in the next block to rise, a new tip or the timeout. | |
| virtual void | interruptWait ()=0 |
| Interrupts the current wait for the next block template. | |
|
virtualdefault |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Compute merkle path to the coinbase transaction.
|
pure virtual |
Return fields needed to construct a coinbase transaction.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Interrupts the current wait for the next block template.
|
pure virtual |
Construct and broadcast the block.
Modifies the template in place, updating the fields listed below as well as the merkle root.
| [in] | version | version block header field |
| [in] | timestamp | time block header field (unix timestamp) |
| [in] | nonce | nonce block header field |
| [in] | coinbase | complete coinbase transaction (including witness) |
|
pure virtual |
Waits for fees in the next block to rise, a new tip or the timeout.
| [in] | options | Control the timeout (default forever) and by how much total fees for the next block should rise (default infinite). |
On testnet this will additionally return a template with difficulty 1 if the tip is more than 20 minutes old.