remove dead code
This commit is contained in:
parent
0f4fd8367d
commit
407b2682e8
|
@ -397,22 +397,6 @@ pub fn read_ledger(
|
|||
Ok(LedgerReader { data })
|
||||
}
|
||||
|
||||
///// copy ledger is doesn't fix up the "from" ledger
|
||||
//pub fn copy_ledger(from: &str, to: &str) -> io::Result<()> {
|
||||
// let mut to = LedgerWriter::new(to, true)?;
|
||||
//
|
||||
// let from = Path::new(&from);
|
||||
//
|
||||
// // for a copy, we read "readonly" from data
|
||||
// let data = File::open(from.join("data"))?;
|
||||
//
|
||||
// for entry in (LedgerReader { data }) {
|
||||
// let entry = entry?;
|
||||
// to.write_entry(&entry)?;
|
||||
// }
|
||||
// Ok(())
|
||||
//}
|
||||
|
||||
// a Block is a slice of Entries
|
||||
pub trait Block {
|
||||
/// Verifies the hashes and counts of a slice of transactions are all consistent.
|
||||
|
@ -873,31 +857,4 @@ mod tests {
|
|||
let _ignored = remove_dir_all(&ledger_path);
|
||||
}
|
||||
|
||||
// #[test]
|
||||
// fn test_copy_ledger() {
|
||||
// use logger;
|
||||
// logger::setup();
|
||||
//
|
||||
// let from = tmp_ledger_path("test_ledger_copy_from");
|
||||
// let entries = make_tiny_test_entries(10);
|
||||
//
|
||||
// let mut writer = LedgerWriter::new(&from, true).unwrap();
|
||||
// writer.write_entries(entries.clone()).unwrap();
|
||||
//
|
||||
// let to = tmp_ledger_path("test_ledger_copy_to");
|
||||
//
|
||||
// copy_ledger(&from, &to).unwrap();
|
||||
//
|
||||
// let mut read_entries = vec![];
|
||||
// for x in read_ledger(&to).unwrap() {
|
||||
// let entry = x.unwrap();
|
||||
// trace!("entry... {:?}", entry);
|
||||
// read_entries.push(entry);
|
||||
// }
|
||||
// assert_eq!(read_entries, entries);
|
||||
//
|
||||
// std::fs::remove_dir_all(from).unwrap();
|
||||
// std::fs::remove_dir_all(to).unwrap();
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue