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

Method new

chapter 4/blockchain.rs:242–247  ·  view source on GitHub ↗
(tip_hash: String, db: Db)

Source from the content-addressed store, hash-verified

240
241impl BlockchainIterator {
242 fn new(tip_hash: String, db: Db) -> BlockchainIterator {
243 BlockchainIterator {
244 current_hash: tip_hash,
245 db,
246 }
247 }
248
249 pub fn next(&mut self) -> Option<Block> {
250 let block_tree = self.db.open_tree(BLOCKS_TREE).unwrap();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected