Moves code walkthrough book chapters to docs (#629)

* replaced template blocks with code blocks in stages chapter

* replaced template blocks with code blocks in network chapter

* moved book sections to docs

* fix indentation in recover_signer codeblock

* remove unnecessary TODO comment in network.md
This commit is contained in:
Andrew Kirillov
2022-12-28 01:24:39 -08:00
committed by GitHub
parent a51fa4fd63
commit d4d8a8c882
29 changed files with 1178 additions and 458 deletions

View File

@ -105,7 +105,6 @@ impl Command {
let genesis_hash = init_genesis(db.clone(), self.chain.genesis.clone())?;
info!("Connecting to p2p");
// ANCHOR: snippet-execute
let network = start_network(network_config(db.clone(), chain_id, genesis_hash)).await?;
// TODO: Are most of these Arcs unnecessary? For example, fetch client is completely
@ -155,7 +154,6 @@ impl Command {
// Run pipeline
info!("Starting pipeline");
pipeline.run(db.clone()).await?;
// ANCHOR_END: snippet-execute
info!("Finishing up");
Ok(())
@ -224,7 +222,6 @@ fn network_config<DB: Database>(
}
/// Starts the networking stack given a [NetworkConfig] and returns a handle to the network.
// ANCHOR: fn-start_network
async fn start_network<C>(config: NetworkConfig<C>) -> Result<NetworkHandle, NetworkError>
where
C: BlockProvider + HeaderProvider + 'static,
@ -238,4 +235,3 @@ where
tokio::task::spawn(eth);
Ok(handle)
}
// ANCHOR_END: fn-start_network