disable gossip publish of snapshots when using filler accts (#20824)

This commit is contained in:
Jeff Washington (jwash)
2021-10-20 13:07:29 -05:00
committed by GitHub
parent 451aac7f7f
commit 95e91a4863
3 changed files with 32 additions and 11 deletions

View File

@@ -703,12 +703,22 @@ impl Validator {
// Start a snapshot packaging service
let pending_snapshot_package = PendingSnapshotPackage::default();
// filler accounts make snapshots invalid for use
// so, do not publish that we have snapshots
let enable_gossip_push = config
.accounts_db_config
.as_ref()
.and_then(|config| config.filler_account_count)
.map(|count| count == 0)
.unwrap_or(true);
let snapshot_packager_service = SnapshotPackagerService::new(
pending_snapshot_package.clone(),
starting_snapshot_hashes,
&exit,
&cluster_info,
snapshot_config.clone(),
enable_gossip_push,
);
(
Some(snapshot_packager_service),