move tmp_ledger back to target dir

This commit is contained in:
Rob Walker
2018-08-13 12:53:30 -07:00
parent ab10b7676a
commit e8da903c6c
4 changed files with 12 additions and 4 deletions

View File

@@ -1910,9 +1910,11 @@ mod tests {
assert!(rv.is_none());
fn tmp_ledger(name: &str) -> String {
use std::env;
let out_dir = env::var("OUT_DIR").unwrap();
let keypair = Keypair::new();
let path = format!("/tmp/farf/{}-{}", name, keypair.pubkey());
let path = format!("{}/tmp-ledger-{}-{}", out_dir, name, keypair.pubkey());
let mut writer = LedgerWriter::open(&path, true).unwrap();
let zero = Hash::default();