mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Fix some snags in stage 6
This commit is contained in:
parent
d458c4cc1e
commit
11637c4c89
@ -82,12 +82,6 @@ func promoteHashedStateCleanly(s *StageState, db ethdb.Database, datadir string,
|
||||
etl.IdentityLoadFunc,
|
||||
etl.TransformArgs{
|
||||
Quit: quit,
|
||||
OnLoadCommit: func(batch ethdb.Putter, key []byte, isDone bool) error {
|
||||
if isDone {
|
||||
return s.UpdateWithStageData(batch, s.BlockNumber, toStateStageData(nil))
|
||||
}
|
||||
return s.UpdateWithStageData(batch, s.BlockNumber, toStateStageData(key))
|
||||
},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@ -107,12 +101,6 @@ func promoteHashedStateCleanly(s *StageState, db ethdb.Database, datadir string,
|
||||
etl.IdentityLoadFunc,
|
||||
etl.TransformArgs{
|
||||
Quit: quit,
|
||||
OnLoadCommit: func(batch ethdb.Putter, key []byte, isDone bool) error {
|
||||
if isDone {
|
||||
return s.UpdateWithStageData(batch, s.BlockNumber, nil)
|
||||
}
|
||||
return s.UpdateWithStageData(batch, s.BlockNumber, toCodeStageData(key))
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
@ -304,7 +292,7 @@ func (p *Promoter) Promote(s *StageState, from, to uint64, storage bool, codes b
|
||||
} else {
|
||||
changeSetBucket = dbutils.PlainAccountChangeSetBucket
|
||||
}
|
||||
log.Debug("Incremental promotion started", "from", from, "to", to, "csbucket", string(changeSetBucket))
|
||||
log.Info("Incremental promotion started", "from", from, "to", to, "csbucket", string(changeSetBucket))
|
||||
|
||||
startkey := dbutils.EncodeTimestamp(from + 1)
|
||||
|
||||
@ -331,7 +319,7 @@ func (p *Promoter) Promote(s *StageState, from, to uint64, storage bool, codes b
|
||||
etl.TransformArgs{
|
||||
BufferType: etl.SortableOldestAppearedBuffer,
|
||||
ExtractStartKey: startkey,
|
||||
Quit: p.quitCh,
|
||||
Quit: p.quitCh,
|
||||
},
|
||||
)
|
||||
}
|
||||
@ -346,7 +334,7 @@ func (p *Promoter) Unwind(s *StageState, u *UnwindState, storage bool, codes boo
|
||||
from := s.BlockNumber
|
||||
to := u.UnwindPoint
|
||||
|
||||
log.Debug("Unwinding started", "from", from, "to", to, "storage", storage, "codes", codes)
|
||||
log.Info("Unwinding started", "from", from, "to", to, "storage", storage, "codes", codes)
|
||||
|
||||
startkey := dbutils.EncodeTimestamp(to + 1)
|
||||
|
||||
@ -373,7 +361,7 @@ func (p *Promoter) Unwind(s *StageState, u *UnwindState, storage bool, codes boo
|
||||
etl.TransformArgs{
|
||||
BufferType: etl.SortableOldestAppearedBuffer,
|
||||
ExtractStartKey: startkey,
|
||||
Quit: p.quitCh,
|
||||
Quit: p.quitCh,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user