From a425a47ddcb6078e2ae6ab062bb73f2c0939fd1d Mon Sep 17 00:00:00 2001 From: ucwong Date: Mon, 28 Dec 2020 05:38:16 +0800 Subject: [PATCH] core/rawdb, eth/protocols : Method name typo fix (#22026) --- core/rawdb/accessors_snapshot.go | 4 ++-- eth/protocols/snap/sync.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rawdb/accessors_snapshot.go b/core/rawdb/accessors_snapshot.go index 0a91d9353b..c3616ba3aa 100644 --- a/core/rawdb/accessors_snapshot.go +++ b/core/rawdb/accessors_snapshot.go @@ -176,8 +176,8 @@ func DeleteSnapshotRecoveryNumber(db ethdb.KeyValueWriter) { } } -// ReadSanpshotSyncStatus retrieves the serialized sync status saved at shutdown. -func ReadSanpshotSyncStatus(db ethdb.KeyValueReader) []byte { +// ReadSnapshotSyncStatus retrieves the serialized sync status saved at shutdown. +func ReadSnapshotSyncStatus(db ethdb.KeyValueReader) []byte { data, _ := db.Get(snapshotSyncStatusKey) return data } diff --git a/eth/protocols/snap/sync.go b/eth/protocols/snap/sync.go index 679b328283..437b0caab4 100644 --- a/eth/protocols/snap/sync.go +++ b/eth/protocols/snap/sync.go @@ -614,7 +614,7 @@ func (s *Syncer) Sync(root common.Hash, cancel chan struct{}) error { func (s *Syncer) loadSyncStatus() { 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 { log.Error("Failed to decode snap sync status", "err", err) } else {