Skip to content

Commit

Permalink
Added feature flag to hardcode van block hashes confirmation `HARDCOD…
Browse files Browse the repository at this point in the history
…E_PAN_CONFIRMATION`
  • Loading branch information
blazejkrzak committed Dec 27, 2021
1 parent 7d0d612 commit bde585d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions orchestrator/rpc/api/events/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/ethereum/go-ethereum/rpc"
generalTypes "github.com/lukso-network/lukso-orchestrator/shared/types"
"github.com/pkg/errors"
"os"
"time"
)

Expand Down Expand Up @@ -92,8 +93,15 @@ func (api *PublicFilterAPI) ConfirmVanBlockHashes(
res := make([]*BlockStatus, 0)
for _, req := range requests {
status := api.backend.GetSlotStatus(ctx, req.Slot, req.Hash, false)

log.WithField("slot", req.Slot).WithField("status", status).WithField(
"api", "ConfirmVanBlockHashes").Debug("Status of the requested slot")

if "true" == os.Getenv("HARDCODE_PAN_CONFIRMATION") {
status = generalTypes.Verified
log.WithField("slot", req.Slot).Debug("Fallback because of the hardcode")
}

hash := req.Hash
res = append(res, &BlockStatus{
BlockHash: BlockHash{
Expand Down

0 comments on commit bde585d

Please sign in to comment.