(&self, tx: Transaction)
| 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) { |