@@ -39,12 +39,12 @@ impl LedgerCleanupService {
|
||||
pub fn new(
|
||||
new_root_receiver: Receiver<Slot>,
|
||||
blockstore: Arc<Blockstore>,
|
||||
max_ledger_slots: u64,
|
||||
max_ledger_shreds: u64,
|
||||
exit: &Arc<AtomicBool>,
|
||||
) -> Self {
|
||||
info!(
|
||||
"LedgerCleanupService active. Max Ledger Slots {}",
|
||||
max_ledger_slots
|
||||
max_ledger_shreds
|
||||
);
|
||||
let exit = exit.clone();
|
||||
let mut last_purge_slot = 0;
|
||||
@@ -57,7 +57,7 @@ impl LedgerCleanupService {
|
||||
if let Err(e) = Self::cleanup_ledger(
|
||||
&new_root_receiver,
|
||||
&blockstore,
|
||||
max_ledger_slots,
|
||||
max_ledger_shreds,
|
||||
&mut last_purge_slot,
|
||||
DEFAULT_PURGE_SLOT_INTERVAL,
|
||||
) {
|
||||
|
@@ -63,7 +63,7 @@ pub struct Sockets {
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct TvuConfig {
|
||||
pub max_ledger_slots: Option<u64>,
|
||||
pub max_ledger_shreds: Option<u64>,
|
||||
pub sigverify_disabled: bool,
|
||||
pub shred_version: u16,
|
||||
pub halt_on_trusted_validators_accounts_hash_mismatch: bool,
|
||||
@@ -202,11 +202,11 @@ impl Tvu {
|
||||
retransmit_slots_sender,
|
||||
);
|
||||
|
||||
let ledger_cleanup_service = tvu_config.max_ledger_slots.map(|max_ledger_slots| {
|
||||
let ledger_cleanup_service = tvu_config.max_ledger_shreds.map(|max_ledger_shreds| {
|
||||
LedgerCleanupService::new(
|
||||
ledger_cleanup_slot_receiver,
|
||||
blockstore.clone(),
|
||||
max_ledger_slots,
|
||||
max_ledger_shreds,
|
||||
&exit,
|
||||
)
|
||||
});
|
||||
|
@@ -70,7 +70,7 @@ pub struct ValidatorConfig {
|
||||
pub rpc_config: JsonRpcConfig,
|
||||
pub rpc_ports: Option<(u16, u16)>, // (API, PubSub)
|
||||
pub snapshot_config: Option<SnapshotConfig>,
|
||||
pub max_ledger_slots: Option<u64>,
|
||||
pub max_ledger_shreds: Option<u64>,
|
||||
pub broadcast_stage_type: BroadcastStageType,
|
||||
pub enable_partition: Option<Arc<AtomicBool>>,
|
||||
pub fixed_leader_schedule: Option<FixedSchedule>,
|
||||
@@ -92,7 +92,7 @@ impl Default for ValidatorConfig {
|
||||
expected_shred_version: None,
|
||||
voting_disabled: false,
|
||||
storage_slots_per_turn: DEFAULT_SLOTS_PER_TURN,
|
||||
max_ledger_slots: None,
|
||||
max_ledger_shreds: None,
|
||||
account_paths: Vec::new(),
|
||||
rpc_config: JsonRpcConfig::default(),
|
||||
rpc_ports: None,
|
||||
@@ -439,7 +439,7 @@ impl Validator {
|
||||
vote_tracker.clone(),
|
||||
retransmit_slots_sender,
|
||||
TvuConfig {
|
||||
max_ledger_slots: config.max_ledger_slots,
|
||||
max_ledger_shreds: config.max_ledger_shreds,
|
||||
sigverify_disabled: config.dev_sigverify_disabled,
|
||||
halt_on_trusted_validators_accounts_hash_mismatch: config
|
||||
.halt_on_trusted_validators_accounts_hash_mismatch,
|
||||
|
Reference in New Issue
Block a user