Skip to content

Commit

Permalink
[State Sync] Handle crashes during state sync bootstrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind authored and aptos-bot committed Mar 23, 2022
1 parent c60f2c3 commit ee6b287
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,12 @@ impl<StorageSyncer: StorageSynchronizerInterface + Clone> Bootstrapper<StorageSy
let highest_known_ledger_version = highest_known_ledger_info.ledger_info().version();

// Check if we've already fetched the required data for bootstrapping
if highest_synced_version == highest_known_ledger_version
if highest_synced_version >= highest_known_ledger_version
|| self.account_state_syncer.is_sync_complete
{
return self.bootstrapping_complete();
}

// Verify we haven't synced beyond the highest ledger info
if highest_synced_version > highest_known_ledger_version {
unreachable!(
"Synced beyond the highest ledger info! Synced version: {:?}, highest ledger version: {:?}", highest_synced_version, highest_known_ledger_version
);
}

// Bootstrap according to the mode
if self.driver_configuration.config.bootstrapping_mode
== BootstrappingMode::DownloadLatestAccountStates
Expand Down

0 comments on commit ee6b287

Please sign in to comment.