forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds StartingSnapshotStorages to AccountsHashVerifier (#58)
- Loading branch information
1 parent
f591210
commit 93f5b51
Showing
8 changed files
with
135 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use {crate::accounts_db::AccountStorageEntry, std::sync::Arc}; | ||
|
||
/// Snapshot storages that the node loaded from | ||
/// | ||
/// This is used to support fastboot. Since fastboot reuses existing storages, we must carefully | ||
/// handle the storages used to load at startup. If we do not handle these storages properly, | ||
/// restarting from the same local state (i.e. bank snapshot) may fail. | ||
#[derive(Debug)] | ||
pub enum StartingSnapshotStorages { | ||
/// Starting from genesis has no storages yet | ||
Genesis, | ||
/// Starting from a snapshot archive always extracts the storages from the archive, so no | ||
/// special handling is necessary to preserve them. | ||
Archive, | ||
/// Starting from local state must preserve the loaded storages. These storages must *not* be | ||
/// recycled or removed prior to taking the next snapshot, otherwise restarting from the same | ||
/// bank snapshot may fail. | ||
Fastboot(Vec<Arc<AccountStorageEntry>>), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters