pub struct Config {
pub blocks_dir: PathBuf,
pub network: Network,
pub skip_prevout: bool,
pub max_reorg: u8,
pub channels_size: u8,
pub start_at_height: u32,
pub stop_at_height: Option<u32>,
pub serialization_version: u8,
}
Expand description
Configuration parameters, most important the bitcoin blocks directory
Fields§
§blocks_dir: PathBuf
Blocks directory (containing blocks*.dat
)
network: Network
Network (bitcoin, testnet, regtest, signet)
skip_prevout: bool
Skip calculation of previous outputs, it’s faster and it uses much less memory however make it impossible calculate fees or access tx input previous scripts
max_reorg: u8
Maximum length of a reorg allowed, during reordering send block to the next step only
if it has max_reorg
following blocks. Higher is more conservative, while lower faster.
When parsing testnet blocks, it may be necessary to increase this a lot
channels_size: u8
Size of the channels used to pass messages between threads
start_at_height: u32
Start the blocks iteration at the specified height, note blocks*.dat file are read and analyzed anyway to follow the blockchain starting at the genesis and populate utxos, however they are not emitted
stop_at_height: Option<u32>
Stop the blocks iteration at the specified height
serialization_version: u8
The serialization format to use for the generated BlockExtra