MCPcopy Create free account
hub / github.com/PacktPublishing/Rust-for-Blockchain-Application-Development / add

Method add

chapter 3/req_functions.rs:590–593  ·  view source on GitHub ↗
(&self, tx: Transaction)

Source from the content-addressed store, hash-verified

588 }
589
590 pub fn add(&self, tx: Transaction) {
591 let txid_hex = HEXLOWER.encode(tx.get_id());
592 self.inner.write().unwrap().insert(txid_hex, tx);
593 }
594
595 pub fn get(&self, txid_hex: &str) -> Option<Transaction> {
596 if let Some(tx) = self.inner.read().unwrap().get(txid_hex) {

Callers

nothing calls this directly

Calls 1

get_idMethod · 0.45

Tested by

no test coverage detected