Add cluster state verifier logging (#16330)
* Add cluster state verifier logging * Add duplicate-slots iterator to ledger tool
This commit is contained in:
@ -921,6 +921,11 @@ fn main() {
|
||||
.arg(&starting_slot_arg)
|
||||
.about("Print all the dead slots in the ledger")
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("duplicate-slots")
|
||||
.arg(&starting_slot_arg)
|
||||
.about("Print all the duplicate slots in the ledger")
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("set-dead-slot")
|
||||
.about("Mark one or more slots dead")
|
||||
@ -1601,6 +1606,17 @@ fn main() {
|
||||
println!("{}", slot);
|
||||
}
|
||||
}
|
||||
("duplicate-slots", Some(arg_matches)) => {
|
||||
let blockstore = open_blockstore(
|
||||
&ledger_path,
|
||||
AccessType::TryPrimaryThenSecondary,
|
||||
wal_recovery_mode,
|
||||
);
|
||||
let starting_slot = value_t_or_exit!(arg_matches, "starting_slot", Slot);
|
||||
for slot in blockstore.duplicate_slots_iterator(starting_slot).unwrap() {
|
||||
println!("{}", slot);
|
||||
}
|
||||
}
|
||||
("set-dead-slot", Some(arg_matches)) => {
|
||||
let slots = values_t_or_exit!(arg_matches, "slots", Slot);
|
||||
let blockstore =
|
||||
|
Reference in New Issue
Block a user