mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
save progresss (#1283)
This commit is contained in:
parent
bf044f73ef
commit
dd5258d524
@ -107,6 +107,7 @@ func syncBySmallSteps(ctx context.Context, chaindata string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
st.DisableStages(stages.Headers, stages.BlockHashes, stages.Bodies, stages.Senders)
|
st.DisableStages(stages.Headers, stages.BlockHashes, stages.Bodies, stages.Senders)
|
||||||
|
_ = st.SetCurrentStage(stages.Execution)
|
||||||
|
|
||||||
senderStageProgress := progress(stages.Senders).BlockNumber
|
senderStageProgress := progress(stages.Senders).BlockNumber
|
||||||
|
|
||||||
|
@ -152,6 +152,9 @@ func (s *State) Run(db ethdb.GetterPutter, tx ethdb.GetterPutter) error {
|
|||||||
for !s.IsDone() {
|
for !s.IsDone() {
|
||||||
if !s.unwindStack.Empty() {
|
if !s.unwindStack.Empty() {
|
||||||
for unwind := s.unwindStack.Pop(); unwind != nil; unwind = s.unwindStack.Pop() {
|
for unwind := s.unwindStack.Pop(); unwind != nil; unwind = s.unwindStack.Pop() {
|
||||||
|
if err := s.SetCurrentStage(unwind.Stage); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if s.onBeforeUnwind != nil {
|
if s.onBeforeUnwind != nil {
|
||||||
if err := s.onBeforeUnwind(unwind.Stage); err != nil {
|
if err := s.onBeforeUnwind(unwind.Stage); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user