MCPcopy Create free account
hub / github.com/BitVM/BitVM / read_map_from_file

Function read_map_from_file

bitvm/src/chunk/api.rs:413–420  ·  view source on GitHub ↗
(
            filename: &str,
        )

Source from the content-addressed store, hash-verified

411
412 #[allow(clippy::type_complexity)]
413 pub(crate) fn read_map_from_file(
414 filename: &str,
415 ) -> Result<HashMap<u32, Vec<Vec<u8>>>, Box<dyn Error>> {
416 let file = File::open(filename)?;
417 let reader = BufReader::new(file);
418 let map = serde_json::from_reader(reader)?;
419 Ok(map)
420 }
421
422 pub fn write_scripts_to_file(sig_cache: HashMap<u32, Vec<ScriptBuf>>, file: &str) {
423 let mut buf: HashMap<u32, Vec<Vec<u8>>> = HashMap::new();

Callers 2

read_scripts_from_fileFunction · 0.85
read_asserts_from_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected