MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / main

Function main

chain/src/main.rs:29–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28#[tokio::main]
29async fn main() -> Result<()> {
30 // TODO(ddimaria): remove hard-coded values and implement a genesis file (or via command line when starting the chain)
31 // let storage = Arc::new(Storage::new(None)?);
32 // let blockchain = BlockChain::new(storage)?;
33 // let _server = serve("127.0.0.1:8545", Arc::new(Mutex::new(blockchain))).await?;
34
35 let (blockchain, _, _) = crate::helpers::tests::setup().await;
36 let _server = serve("127.0.0.1:8545", blockchain).await?;
37
38 // create a future that never resolves
39 futures::future::pending().await
40}

Callers

nothing calls this directly

Calls 2

setupFunction · 0.85
serveFunction · 0.85

Tested by

no test coverage detected