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

Method get_transaction_receipt

chain/src/transaction.rs:28–37  ·  view source on GitHub ↗

get the receipt of the transaction

(&self, hash: &H256)

Source from the content-addressed store, hash-verified

26
27 // get the receipt of the transaction
28 pub(crate) fn get_transaction_receipt(&self, hash: &H256) -> Result<TransactionReceipt> {
29 let transaction_receipt = self
30 .receipts
31 .get(hash)
32 .ok_or_else(|| ChainError::TransactionNotFound(hash.to_string()))?
33 .value()
34 .clone();
35
36 Ok(transaction_receipt)
37 }
38}
39
40#[cfg(test)]

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected