Struct nakamoto_node::Config

source ·
pub struct Config {
    pub network: Network,
    pub domains: Vec<Domain, Global>,
    pub connect: Vec<SocketAddr, Global>,
    pub listen: Vec<SocketAddr, Global>,
    pub root: PathBuf,
    pub verify: bool,
    pub user_agent: &'static str,
    pub hooks: Hooks,
    pub services: ServiceFlags,
    pub limits: Limits,
}
Expand description

Client configuration.

Fields

network: Network

Bitcoin network.

domains: Vec<Domain, Global>

Connect via these network domains, eg. IPv4, IPv6.

connect: Vec<SocketAddr, Global>

Peers to connect to instead of using the peer discovery mechanism.

listen: Vec<SocketAddr, Global>

Client listen addresses.

root: PathBuf

Client home path, where runtime data is stored, eg. block headers and filters.

verify: bool

Verify on-disk data at load time. This can be set to true for additional checks, if for example data integrity of the file system is not guaranteed, or the file system is untrusted.

user_agent: &'static str

User agent string.

hooks: Hooks

Client hooks.

services: ServiceFlags

Services offered by this node.

limits: Limits

Configured limits.

Implementations

Create a new configuration for the given network.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.