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

Function it_gets_the_latest_block

web3/src/block.rs:79–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78 #[tokio::test]
79 async fn it_gets_the_latest_block() {
80 let block_number = web3().get_block_number().await.unwrap();
81 let response = web3().get_block(*block_number).await;
82 assert!(response.is_ok());
83 }
84}

Callers

nothing calls this directly

Calls 3

web3Function · 0.85
get_block_numberMethod · 0.80
get_blockMethod · 0.80

Tested by

no test coverage detected