Function zebrad::components::miner::spawn_init

source ·
pub fn spawn_init<Mempool, State, Tip, BlockVerifierRouter, SyncStatus, AddressBook>(
    config: &Config,
    rpc: GetBlockTemplateRpcImpl<Mempool, State, Tip, BlockVerifierRouter, SyncStatus, AddressBook>
) -> JoinHandle<Result<(), Report>>
where Mempool: Service<Request, Response = Response, Error = BoxError> + Clone + Send + Sync + 'static, Mempool::Future: Send, State: Service<ReadRequest, Response = ReadResponse, Error = BoxError> + Clone + Send + Sync + 'static, <State as Service<ReadRequest>>::Future: Send, Tip: ChainTip + Clone + Send + Sync + 'static, BlockVerifierRouter: Service<Request, Response = Hash, Error = BoxError> + Clone + Send + Sync + 'static, <BlockVerifierRouter as Service<Request>>::Future: Send, SyncStatus: ChainSyncStatus + Clone + Send + Sync + 'static, AddressBook: AddressBookPeers + Clone + Send + Sync + 'static,
Expand description

Initialize the miner based on its config, and spawn a task for it.

This method is CPU and memory-intensive. It uses 144 MB of RAM and one CPU core per configured mining thread.

See run_mining_solver() for more details.