Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"time"

"github.com/attestantio/go-eth2-client/spec"
v2 "github.com/ethpandaops/xatu/pkg/proto/eth/v2"
Expand Down Expand Up @@ -97,21 +96,6 @@ func (b *BeaconBlockV2) Filter(ctx context.Context) bool {
return true
}

// check if block wasn't finalized when requested and filter if already in cache
if !additionalData.EthV2BeaconBlockV2.GetFinalizedWhenRequested() {
key := "beacon_block" + ":" + hash

_, retrieved, err := b.nonFinalizedCache.GetOrSet(ctx, key, version, time.Minute*30)
if err != nil {
b.log.WithError(err).Error("failed to retrieve from cache")

return true
}

// If the block is already in the cache, filter it out
return retrieved
}

return false
}

Expand Down
Loading