![]() |
Bitcoin Core 31.99.0
P2P Digital Currency
|
Template containing all coinbase transaction fields that are set by our miner code. More...
#include <mining_types.h>
Public Attributes | |
| uint32_t | version |
| uint32_t | sequence |
| CScript | script_sig_prefix |
| Prefix which needs to be placed at the beginning of the scriptSig. More... | |
| std::optional< uint256 > | witness |
| The first (and only) witness stack element of the coinbase input. More... | |
| CAmount | block_reward_remaining |
| Block subsidy plus fees, minus any non-zero required_outputs. More... | |
| std::vector< CTxOut > | required_outputs |
| uint32_t | lock_time |
Template containing all coinbase transaction fields that are set by our miner code.
Clients are expected to add their own outputs and typically also expand the scriptSig.
Definition at line 132 of file mining_types.h.
| CAmount node::CoinbaseTx::block_reward_remaining |
Block subsidy plus fees, minus any non-zero required_outputs.
Currently there are no non-zero required_outputs, so block_reward_remaining is the entire block reward. See also required_outputs.
Definition at line 164 of file mining_types.h.
| uint32_t node::CoinbaseTx::lock_time |
Definition at line 173 of file mining_types.h.
| std::vector<CTxOut> node::CoinbaseTx::required_outputs |
Definition at line 172 of file mining_types.h.
| CScript node::CoinbaseTx::script_sig_prefix |
Prefix which needs to be placed at the beginning of the scriptSig.
Clients may append extra data to this as long as the overall scriptSig size is 100 bytes or less, to avoid the block being rejected with "bad-cb-length" error. At heights <= 16 the BIP 34 height push is only one byte long, so clients must append at least one additional byte to meet the consensus minimum scriptSig length of two bytes.
Currently with BIP 34, the prefix is guaranteed to be less than 8 bytes, but future soft forks could require longer prefixes.
Definition at line 148 of file mining_types.h.
| uint32_t node::CoinbaseTx::sequence |
Definition at line 136 of file mining_types.h.
| uint32_t node::CoinbaseTx::version |
Definition at line 134 of file mining_types.h.
| std::optional<uint256> node::CoinbaseTx::witness |
The first (and only) witness stack element of the coinbase input.
Omitted for block templates without witness data.
This is currently the BIP 141 witness reserved value, and can be chosen arbitrarily by the node, but future soft forks may constrain it.
Definition at line 157 of file mining_types.h.