Remove unnecessary snapshot hash verification (#8711)
This commit is contained in:
parent
97986a5241
commit
f992ee3140
|
@ -352,34 +352,6 @@ impl Validator {
|
||||||
.set_entrypoint(entrypoint_info.clone());
|
.set_entrypoint(entrypoint_info.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref snapshot_hash) = snapshot_hash {
|
|
||||||
if let Some(ref trusted_validators) = config.trusted_validators {
|
|
||||||
let mut trusted = false;
|
|
||||||
for _ in 0..10 {
|
|
||||||
trusted = cluster_info
|
|
||||||
.read()
|
|
||||||
.unwrap()
|
|
||||||
.get_snapshot_hash(snapshot_hash.0)
|
|
||||||
.iter()
|
|
||||||
.any(|(pubkey, hash)| {
|
|
||||||
trusted_validators.contains(pubkey) && snapshot_hash.1 == *hash
|
|
||||||
});
|
|
||||||
if trusted {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
sleep(Duration::from_secs(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
if !trusted {
|
|
||||||
error!(
|
|
||||||
"The snapshot hash for slot {} is not published by your trusted validators: {:?}",
|
|
||||||
snapshot_hash.0, trusted_validators
|
|
||||||
);
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let (snapshot_packager_service, snapshot_package_sender) =
|
let (snapshot_packager_service, snapshot_package_sender) =
|
||||||
if config.snapshot_config.is_some() {
|
if config.snapshot_config.is_some() {
|
||||||
// Start a snapshot packaging service
|
// Start a snapshot packaging service
|
||||||
|
|
Loading…
Reference in New Issue