Switch blockstream_service to create_new_tmp_ledger!

This commit is contained in:
Michael Vines 2019-02-28 07:46:42 -08:00 committed by Grimes
parent a79caf7795
commit 271115a6be
2 changed files with 5 additions and 8 deletions

View File

@ -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

View File

@ -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;