Add solana-ledger crate (#6415)

automerge
This commit is contained in:
Greg Fitzgerald
2019-10-18 10:28:51 -06:00
committed by Grimes
parent 6f58bdfcb1
commit 5468be2ef9
74 changed files with 350 additions and 273 deletions

View File

@@ -5,13 +5,13 @@ use solana_client::thin_client::create_client;
/// All tests must start from an entry point and a funding keypair and
/// discover the rest of the network.
use solana_core::{
blocktree::Blocktree,
cluster_info::VALIDATOR_PORT_RANGE,
consensus::VOTE_THRESHOLD_DEPTH,
contact_info::ContactInfo,
entry::{Entry, EntrySlice},
cluster_info::VALIDATOR_PORT_RANGE, consensus::VOTE_THRESHOLD_DEPTH, contact_info::ContactInfo,
gossip_service::discover_cluster,
};
use solana_ledger::{
blocktree::Blocktree,
entry::{Entry, EntrySlice},
};
use solana_sdk::{
client::SyncClient,
clock::{DEFAULT_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, NUM_CONSECUTIVE_LEADER_SLOTS},

View File

@@ -19,7 +19,7 @@ extern crate solana_bench_tps;
#[macro_use]
#[cfg(test)]
extern crate solana_core;
extern crate solana_ledger;
#[cfg(test)]
extern crate solana_drone;

View File

@@ -1,7 +1,6 @@
use crate::cluster::{Cluster, ClusterValidatorInfo, ValidatorInfo};
use solana_client::thin_client::{create_client, ThinClient};
use solana_core::{
blocktree::create_new_tmp_ledger,
cluster_info::{Node, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo},
@@ -10,6 +9,7 @@ use solana_core::{
service::Service,
validator::{Validator, ValidatorConfig},
};
use solana_ledger::blocktree::create_new_tmp_ledger;
use solana_sdk::{
client::SyncClient,
clock::{DEFAULT_SLOTS_PER_EPOCH, DEFAULT_SLOTS_PER_SEGMENT, DEFAULT_TICKS_PER_SLOT},

View File

@@ -6,9 +6,10 @@ use crate::{
use log::*;
use serial_test_derive::serial;
use solana_core::{
bank_forks::SnapshotConfig, blocktree::Blocktree, broadcast_stage::BroadcastStageType,
bank_forks::SnapshotConfig, broadcast_stage::BroadcastStageType,
gossip_service::discover_cluster, snapshot_utils, validator::ValidatorConfig,
};
use solana_ledger::blocktree::Blocktree;
use solana_runtime::accounts_db::AccountsDB;
use solana_sdk::{
client::SyncClient,

View File

@@ -1,13 +1,13 @@
use crate::local_cluster::{ClusterConfig, LocalCluster};
use serial_test_derive::serial;
use solana_client::thin_client::create_client;
use solana_core::blocktree::{create_new_tmp_ledger, get_tmp_ledger_path, Blocktree};
use solana_core::cluster_info::{ClusterInfo, Node, VALIDATOR_PORT_RANGE};
use solana_core::contact_info::ContactInfo;
use solana_core::gossip_service::discover_cluster;
use solana_core::replicator::Replicator;
use solana_core::storage_stage::SLOTS_PER_TURN_TEST;
use solana_core::validator::ValidatorConfig;
use solana_ledger::blocktree::{create_new_tmp_ledger, get_tmp_ledger_path, Blocktree};
use solana_sdk::genesis_block::create_genesis_block;
use solana_sdk::signature::{Keypair, KeypairUtil};
use std::fs::remove_dir_all;