diff --git a/src/blockstream_service.rs b/src/blockstream_service.rs index 2a52235ae8..03c9f4795e 100644 --- a/src/blockstream_service.rs +++ b/src/blockstream_service.rs @@ -106,7 +106,7 @@ impl Service for BlockstreamService { #[cfg(test)] mod test { use super::*; - use crate::blocktree::{create_new_ledger, get_tmp_ledger_path}; + use crate::blocktree::create_new_tmp_ledger; use crate::entry::{create_ticks, Entry}; use chrono::{DateTime, FixedOffset}; use serde_json::Value; @@ -124,11 +124,8 @@ mod test { // Set up genesis block and blocktree let (mut genesis_block, _mint_keypair) = GenesisBlock::new(1000); genesis_block.ticks_per_slot = ticks_per_slot; - let (ledger_path, _last_id) = { - let ledger_path = get_tmp_ledger_path(&format!("{}-{}", file!(), line!())); - let last_id = create_new_ledger(&ledger_path, &genesis_block).unwrap(); - (ledger_path, last_id) - }; + + let (ledger_path, _last_id) = create_new_tmp_ledger!(&genesis_block); let blocktree = Blocktree::open_config(&ledger_path, ticks_per_slot).unwrap(); // Set up blockstream diff --git a/src/lib.rs b/src/lib.rs index 33f37818b0..f823393212 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,10 +25,10 @@ pub mod crds_gossip_push; pub mod crds_value; #[macro_use] pub mod contact_info; -pub mod blockstream; -pub mod blockstream_service; #[macro_use] pub mod blocktree; +pub mod blockstream; +pub mod blockstream_service; pub mod blocktree_processor; pub mod cluster_info; pub mod db_window;