(hmap: &mut Mutex<HashMap<String, Block>>, block: Block)
| 69 | } |
| 70 | |
| 71 | fn update_hmap(hmap: &mut Mutex<HashMap<String, Block>>, block: Block) { |
| 72 | let mut hmap = hmap.lock().unwrap(); |
| 73 | let hash = block.hash.clone(); |
| 74 | hmap.insert(hash, block); |
| 75 | } |
| 76 | |
| 77 | fn write_block(db: &mut Database<BKey>, block: &Block) { |
| 78 | let header_ser = serialize(&(block.header)); |