From 1b8b2027e6cd1ebdb53b2ed9e3a399eca1a8eaa1 Mon Sep 17 00:00:00 2001 From: Patrick Pfeiffer Date: Sun, 8 Sep 2024 01:30:34 +0200 Subject: [PATCH] (NOBIDS) fix transforming ens with long names --- db/ens.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/db/ens.go b/db/ens.go index 333fb83c11..943fab3e29 100644 --- a/db/ens.go +++ b/db/ens.go @@ -170,6 +170,10 @@ func (bigtable *Bigtable) TransformEnsNameRegistered(blk *types.Eth1Block, cache utils.LogWarn(err, "error unpacking ens-log", 0, logFields) continue } + if err = verifyName(r.Name); err != nil { + utils.LogWarn(err, "error verifying ens-name", 0, logFields) + continue + } keys[fmt.Sprintf("%s:ENS:V:N:%s", bigtable.chainId, r.Name)] = true keys[fmt.Sprintf("%s:ENS:V:A:%x", bigtable.chainId, r.Owner)] = true } else if bytes.Equal(lTopic, ensContracts.ENSETHRegistrarControllerParsedABI.Events["NameRenewed"].ID.Bytes()) { @@ -180,6 +184,10 @@ func (bigtable *Bigtable) TransformEnsNameRegistered(blk *types.Eth1Block, cache utils.LogWarn(err, "error unpacking ens-log", 0, logFields) continue } + if err = verifyName(r.Name); err != nil { + utils.LogWarn(err, "error verifying ens-name", 0, logFields) + continue + } keys[fmt.Sprintf("%s:ENS:V:N:%s", bigtable.chainId, r.Name)] = true } } else if ensContract == "OldEnsRegistrarController" {