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

Method new

chapter 5/memory_pool.rs:12–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11impl MemoryPool {
12 pub fn new() -> MemoryPool {
13 MemoryPool {
14 inner: RwLock::new(HashMap::new()),
15 }
16 }
17
18 pub fn contains(&self, txid_hex: &str) -> bool {
19 self.inner.read().unwrap().contains_key(txid_hex)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected