@@ -26,7 +26,6 @@ import (
26
26
"github.com/spf13/afero"
27
27
28
28
libcommon "github.com/erigontech/erigon-lib/common"
29
- "github.com/erigontech/erigon-lib/common/dbg"
30
29
"github.com/erigontech/erigon-lib/log/v3"
31
30
"github.com/erigontech/erigon/cl/beacon/beacon_router_configuration"
32
31
"github.com/erigontech/erigon/cl/beacon/beaconevents"
@@ -421,11 +420,8 @@ func (f *forkGraphDisk) getState(blockRoot libcommon.Hash, alwaysCopy bool, addC
421
420
blocksInTheWay := []* cltypes.SignedBeaconBlock {}
422
421
// Use the parent root as a reverse iterator.
423
422
currentIteratorRoot := blockRoot
424
- var copyReferencedState , outState * state.CachingBeaconState
423
+ var copyReferencedState * state.CachingBeaconState
425
424
var err error
426
- if addChainSegment && dbg .CaplinEfficientReorg {
427
- outState = f .currentState
428
- }
429
425
430
426
// try and find the point of recconnection
431
427
for copyReferencedState == nil {
@@ -434,7 +430,7 @@ func (f *forkGraphDisk) getState(blockRoot libcommon.Hash, alwaysCopy bool, addC
434
430
// check if it is in the header
435
431
bHeader , ok := f .GetHeader (currentIteratorRoot )
436
432
if ok && bHeader .Slot % dumpSlotFrequency == 0 {
437
- copyReferencedState , err = f .readBeaconStateFromDisk (currentIteratorRoot , outState )
433
+ copyReferencedState , err = f .readBeaconStateFromDisk (currentIteratorRoot )
438
434
if err != nil {
439
435
log .Trace ("Could not retrieve state: Missing header" , "missing" , currentIteratorRoot , "err" , err )
440
436
copyReferencedState = nil
@@ -445,7 +441,7 @@ func (f *forkGraphDisk) getState(blockRoot libcommon.Hash, alwaysCopy bool, addC
445
441
return nil , nil
446
442
}
447
443
if block .Block .Slot % dumpSlotFrequency == 0 {
448
- copyReferencedState , err = f .readBeaconStateFromDisk (currentIteratorRoot , outState )
444
+ copyReferencedState , err = f .readBeaconStateFromDisk (currentIteratorRoot )
449
445
if err != nil {
450
446
log .Trace ("Could not retrieve state: Missing header" , "missing" , currentIteratorRoot , "err" , err )
451
447
}
0 commit comments