mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
trie: fix lint
This commit is contained in:
parent
1a0a4c4f61
commit
9589d690eb
1 changed files with 6 additions and 6 deletions
|
|
@ -64,9 +64,9 @@ type inspector struct {
|
||||||
sem *semaphore.Weighted
|
sem *semaphore.Weighted
|
||||||
|
|
||||||
// Pass 1: dump file writer.
|
// Pass 1: dump file writer.
|
||||||
dumpMu sync.Mutex
|
dumpMu sync.Mutex
|
||||||
dumpBuf *bufio.Writer
|
dumpBuf *bufio.Writer
|
||||||
dumpFile *os.File
|
dumpFile *os.File
|
||||||
storageRecordsWritten atomic.Uint64
|
storageRecordsWritten atomic.Uint64
|
||||||
|
|
||||||
errMu sync.Mutex
|
errMu sync.Mutex
|
||||||
|
|
@ -139,10 +139,10 @@ func Inspect(triedb database.NodeDatabase, root common.Hash, config *InspectConf
|
||||||
if err := in.closeDump(); err != nil {
|
if err := in.closeDump(); err != nil {
|
||||||
in.setError(err)
|
in.setError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop progress reporter
|
// Stop progress reporter
|
||||||
close(done)
|
close(done)
|
||||||
|
|
||||||
if err := in.getError(); err != nil {
|
if err := in.getError(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -403,7 +403,7 @@ func (in *inspector) writeDumpRecord(owner common.Hash, s *LevelStats) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
in.setError(fmt.Errorf("failed writing trie dump record: %w", err))
|
in.setError(fmt.Errorf("failed writing trie dump record: %w", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increment counter for storage tries only (not for account trie)
|
// Increment counter for storage tries only (not for account trie)
|
||||||
if owner != (common.Hash{}) {
|
if owner != (common.Hash{}) {
|
||||||
in.storageRecordsWritten.Add(1)
|
in.storageRecordsWritten.Add(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue