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

Function assert_receipt

chain/src/blockchain.rs:325–336  ·  view source on GitHub ↗
(blockchain: Arc<Mutex<BlockChain>>, transaction_hash: H256)

Source from the content-addressed store, hash-verified

323 }
324
325 pub(crate) async fn assert_receipt(blockchain: Arc<Mutex<BlockChain>>, transaction_hash: H256) {
326 process_transactions(blockchain.clone()).await;
327
328 let receipt = blockchain
329 .lock()
330 .await
331 .transactions
332 .lock()
333 .await
334 .get_transaction_receipt(&transaction_hash)
335 .unwrap();
336 }
337
338 pub(crate) async fn get_balance(blockchain: Arc<Mutex<BlockChain>>, account: &Account) -> U256 {
339 blockchain

Callers 3

sends_a_transactionFunction · 0.85
send_a_raw_transactionFunction · 0.85

Calls 2

process_transactionsFunction · 0.85

Tested by

no test coverage detected