Block template creation options. These override node defaults, but can't exceed node limits (e.g. block_reserved_weight can't exceed max block weight).

Synopsis

Declared in <node/mining_types.h>

struct BlockCreateOptions;

Data Members

Name

Description

block_max_weight

Maximum block weight, defaults to ‐maxblockweight

block_min_fee_rate

Minimum fee rate for transactions to be included. Providing a value overrides the ‐blockmintxfee startup setting.

block_reserved_weight

The default reserved weight for the fixed‐size block header, transaction count and coinbase transaction. Minimum: 2000 weight units (MINIMUM_BLOCK_RESERVED_WEIGHT).

coinbase_output_max_additional_sigops

The maximum additional sigops which the pool will add in coinbase transaction outputs.

coinbase_output_script

Script to put in the coinbase transaction. The default is an anyone‐can‐spend dummy.

print_modified_fee

Whether to log the fee rate of each transaction when it is added to the block template. Providing a value overrides the ‐printpriority startup setting.

test_block_validity

Whether to call TestBlockValidity() at the end of CreateNewBlock(). Should only be disabled for tests / benchmarks.

use_mempool

Set false to omit mempool transactions

Non-Member Functions

Name

Description

CheckMiningOptions

Check option values for validity. Returns an error for invalid values.

FlattenMiningOptions

Replace null optional values with their hardcoded defaults.

MergeMiningOptions

Merge two BlockCreateOptions structs, replacing null values in x with non‐null values from y.

ReadMiningArgs

Read the mining options set in args. Returns an error if one was encountered.

Created with MrDocs