Switch blockstream_service to create_new_tmp_ledger!
This commit is contained in:
parent
a79caf7795
commit
271115a6be
|
@ -106,7 +106,7 @@ impl Service for BlockstreamService {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
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 crate::entry::{create_ticks, Entry};
|
||||||
use chrono::{DateTime, FixedOffset};
|
use chrono::{DateTime, FixedOffset};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
@ -124,11 +124,8 @@ mod test {
|
||||||
// Set up genesis block and blocktree
|
// Set up genesis block and blocktree
|
||||||
let (mut genesis_block, _mint_keypair) = GenesisBlock::new(1000);
|
let (mut genesis_block, _mint_keypair) = GenesisBlock::new(1000);
|
||||||
genesis_block.ticks_per_slot = ticks_per_slot;
|
genesis_block.ticks_per_slot = ticks_per_slot;
|
||||||
let (ledger_path, _last_id) = {
|
|
||||||
let ledger_path = get_tmp_ledger_path(&format!("{}-{}", file!(), line!()));
|
let (ledger_path, _last_id) = create_new_tmp_ledger!(&genesis_block);
|
||||||
let last_id = create_new_ledger(&ledger_path, &genesis_block).unwrap();
|
|
||||||
(ledger_path, last_id)
|
|
||||||
};
|
|
||||||
let blocktree = Blocktree::open_config(&ledger_path, ticks_per_slot).unwrap();
|
let blocktree = Blocktree::open_config(&ledger_path, ticks_per_slot).unwrap();
|
||||||
|
|
||||||
// Set up blockstream
|
// Set up blockstream
|
||||||
|
|
|
@ -25,10 +25,10 @@ pub mod crds_gossip_push;
|
||||||
pub mod crds_value;
|
pub mod crds_value;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
pub mod contact_info;
|
pub mod contact_info;
|
||||||
pub mod blockstream;
|
|
||||||
pub mod blockstream_service;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
pub mod blocktree;
|
pub mod blocktree;
|
||||||
|
pub mod blockstream;
|
||||||
|
pub mod blockstream_service;
|
||||||
pub mod blocktree_processor;
|
pub mod blocktree_processor;
|
||||||
pub mod cluster_info;
|
pub mod cluster_info;
|
||||||
pub mod db_window;
|
pub mod db_window;
|
||||||
|
|
Loading…
Reference in New Issue