diff --git a/cl/antiquary/antiquary.go b/cl/antiquary/antiquary.go index 56b9cbfdb51..645f8d328ba 100644 --- a/cl/antiquary/antiquary.go +++ b/cl/antiquary/antiquary.go @@ -22,7 +22,7 @@ import ( const safetyMargin = 10_000 // We retire snapshots 10k blocks after the finalized head -var IsTest = false +var IsTest = true // Antiquary is where the snapshots go, aka old history, it is what keep track of the oldest records. type Antiquary struct { diff --git a/cl/antiquary/tests/tests.go b/cl/antiquary/tests/tests.go index 95aaaaf303e..58f99cb1490 100644 --- a/cl/antiquary/tests/tests.go +++ b/cl/antiquary/tests/tests.go @@ -9,7 +9,6 @@ import ( libcommon "github.com/ledgerwatch/erigon-lib/common" "github.com/ledgerwatch/erigon-lib/kv" - "github.com/ledgerwatch/erigon/cl/antiquary" "github.com/ledgerwatch/erigon/cl/clparams" "github.com/ledgerwatch/erigon/cl/cltypes" "github.com/ledgerwatch/erigon/cl/persistence/beacon_indicies" @@ -53,7 +52,6 @@ type MockBlockReader struct { } func NewMockBlockReader() *MockBlockReader { - antiquary.IsTest = true return &MockBlockReader{U: make(map[uint64]*cltypes.SignedBeaconBlock)} } @@ -101,7 +99,6 @@ func LoadChain(blocks []*cltypes.SignedBeaconBlock, s *state.CachingBeaconState, tx, err := db.BeginRw(context.Background()) require.NoError(t, err) defer tx.Rollback() - antiquary.IsTest = true m := NewMockBlockReader() for _, block := range blocks { @@ -118,7 +115,6 @@ func LoadChain(blocks []*cltypes.SignedBeaconBlock, s *state.CachingBeaconState, func GetCapellaRandom() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState, *state.CachingBeaconState) { block1 := cltypes.NewSignedBeaconBlock(&clparams.MainnetBeaconConfig) block2 := cltypes.NewSignedBeaconBlock(&clparams.MainnetBeaconConfig) - antiquary.IsTest = true // Lets do te if err := utils.DecodeSSZSnappy(block1, capella_blocks_0_ssz_snappy, int(clparams.CapellaVersion)); err != nil { @@ -143,7 +139,6 @@ func GetCapellaRandom() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState func GetPhase0Random() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState, *state.CachingBeaconState) { block1 := cltypes.NewSignedBeaconBlock(&clparams.MainnetBeaconConfig) block2 := cltypes.NewSignedBeaconBlock(&clparams.MainnetBeaconConfig) - antiquary.IsTest = true // Lets do te if err := utils.DecodeSSZSnappy(block1, phase0_blocks_0_ssz_snappy, int(clparams.Phase0Version)); err != nil { @@ -166,7 +161,6 @@ func GetPhase0Random() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState, func GetBellatrixRandom() ([]*cltypes.SignedBeaconBlock, *state.CachingBeaconState, *state.CachingBeaconState) { ret := make([]*cltypes.SignedBeaconBlock, 0, 96) - antiquary.IsTest = true // format for blocks is blocks_{i}.ssz_snappy where i is the index of the block, starting from 0 to 95 included. for i := 0; i < 96; i++ { diff --git a/cmd/caplin/caplin1/run.go b/cmd/caplin/caplin1/run.go index b04def6aeec..88b17b385ce 100644 --- a/cmd/caplin/caplin1/run.go +++ b/cmd/caplin/caplin1/run.go @@ -225,6 +225,7 @@ func RunCaplinPhase1(ctx context.Context, engine execution_client.ExecutionEngin } }() } + antiquary.IsTest = false tx, err := indexDB.BeginRw(ctx) if err != nil {