core/rawdb, eth/protocols : Method name typo fix (#22026)

This commit is contained in:
ucwong 2020-12-28 05:38:16 +08:00 committed by GitHub
parent c17a7733df
commit a425a47ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -176,8 +176,8 @@ func DeleteSnapshotRecoveryNumber(db ethdb.KeyValueWriter) {
} }
} }
// ReadSanpshotSyncStatus retrieves the serialized sync status saved at shutdown. // ReadSnapshotSyncStatus retrieves the serialized sync status saved at shutdown.
func ReadSanpshotSyncStatus(db ethdb.KeyValueReader) []byte { func ReadSnapshotSyncStatus(db ethdb.KeyValueReader) []byte {
data, _ := db.Get(snapshotSyncStatusKey) data, _ := db.Get(snapshotSyncStatusKey)
return data return data
} }

View File

@ -614,7 +614,7 @@ func (s *Syncer) Sync(root common.Hash, cancel chan struct{}) error {
func (s *Syncer) loadSyncStatus() { func (s *Syncer) loadSyncStatus() {
var progress syncProgress var progress syncProgress
if status := rawdb.ReadSanpshotSyncStatus(s.db); status != nil { if status := rawdb.ReadSnapshotSyncStatus(s.db); status != nil {
if err := json.Unmarshal(status, &progress); err != nil { if err := json.Unmarshal(status, &progress); err != nil {
log.Error("Failed to decode snap sync status", "err", err) log.Error("Failed to decode snap sync status", "err", err)
} else { } else {