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

Function gets_a_transaction_receipt

chain/src/transaction.rs:60–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59 #[tokio::test]
60 async fn gets_a_transaction_receipt() {
61 let (blockchain, _, _) = setup().await;
62 let to = Account::random();
63 let transaction = new_transaction(to, blockchain.clone()).await;
64 let transaction_hash = transaction.hash.unwrap();
65
66 blockchain
67 .lock()
68 .await
69 .transactions
70 .lock()
71 .await
72 .send_transaction(transaction);
73
74 assert_receipt(blockchain, transaction_hash).await;
75 }
76}

Callers

nothing calls this directly

Calls 4

setupFunction · 0.85
assert_receiptFunction · 0.85
new_transactionFunction · 0.70
send_transactionMethod · 0.45

Tested by

no test coverage detected