mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
Log Info and duplication fix (#735)
This commit is contained in:
parent
8335700331
commit
16695eb100
@ -50,7 +50,7 @@ func (l *progressLogger) Start(numberRef *uint64) {
|
||||
speed := float64(now-prev) / float64(l.interval)
|
||||
var m runtime.MemStats
|
||||
runtime.ReadMemStats(&m)
|
||||
log.Debug("Executed blocks:",
|
||||
log.Info("Executed blocks:",
|
||||
"currentBlock", now,
|
||||
"speed (blk/second)", speed,
|
||||
"state batch", common.StorageSize(l.batch.BatchSize()),
|
||||
|
@ -215,7 +215,7 @@ type OldestAppearedLoad struct {
|
||||
lastKey bytes.Buffer
|
||||
}
|
||||
|
||||
func (l OldestAppearedLoad) LoadFunc(k []byte, value []byte, state etl.State, next etl.LoadNextFunc) error {
|
||||
func (l *OldestAppearedLoad) LoadFunc(k []byte, value []byte, state etl.State, next etl.LoadNextFunc) error {
|
||||
if bytes.Equal(k, l.lastKey.Bytes()) {
|
||||
return nil
|
||||
}
|
||||
|
@ -217,9 +217,6 @@ func (r *Receiver) accountLoad(k []byte, value []byte, _ etl.State, _ etl.LoadNe
|
||||
return err
|
||||
}
|
||||
newKStr := string(newK)
|
||||
if _, ok := r.accountMap[newKStr]; ok {
|
||||
return nil
|
||||
}
|
||||
if len(value) > 0 {
|
||||
var a accounts.Account
|
||||
if err = a.DecodeForStorage(value); err != nil {
|
||||
@ -239,9 +236,6 @@ func (r *Receiver) storageLoad(k []byte, value []byte, _ etl.State, _ etl.LoadNe
|
||||
return err
|
||||
}
|
||||
newKStr := string(newK)
|
||||
if _, ok := r.storageMap[newKStr]; ok {
|
||||
return nil
|
||||
}
|
||||
if len(value) > 0 {
|
||||
r.storageMap[newKStr] = common.CopyBytes(value)
|
||||
} else {
|
||||
@ -451,7 +445,7 @@ func incrementIntermediateHashes(s *StageState, db ethdb.Database, from, to uint
|
||||
if subTries.Hashes[0] != expectedRootHash {
|
||||
return fmt.Errorf("wrong trie root: %x, expected (from header): %x", subTries.Hashes[0], expectedRootHash)
|
||||
}
|
||||
log.Debug("Collection finished",
|
||||
log.Info("Collection finished",
|
||||
"root hash", subTries.Hashes[0].Hex(),
|
||||
"gen IH", generationIHTook,
|
||||
)
|
||||
@ -524,7 +518,7 @@ func unwindIntermediateHashesStageImpl(u *UnwindState, s *StageState, db ethdb.D
|
||||
if subTries.Hashes[0] != expectedRootHash {
|
||||
return fmt.Errorf("wrong trie root: %x, expected (from header): %x", subTries.Hashes[0], expectedRootHash)
|
||||
}
|
||||
log.Debug("Collection finished",
|
||||
log.Info("Collection finished",
|
||||
"root hash", subTries.Hashes[0].Hex(),
|
||||
"gen IH", generationIHTook,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user