From 77c866109bbc4f5651de9ba47591813f354aca26 Mon Sep 17 00:00:00 2001 From: Patrick Pfeiffer Date: Thu, 21 Dec 2023 16:35:31 +0100 Subject: [PATCH] (BIDS-2437) misc: fix fix-ens --- cmd/misc/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/misc/main.go b/cmd/misc/main.go index 1cfd11ccdb..cd6a1e728b 100644 --- a/cmd/misc/main.go +++ b/cmd/misc/main.go @@ -469,7 +469,7 @@ func fixEns(erigonClient *rpc.ErigonClient) error { if reverseName != addr.EnsName { logrus.WithFields(logrus.Fields{"addr": fmt.Sprintf("%#x", addr.Address), "name": addr.EnsName, "reason": fmt.Sprintf("resolved != reverseResolved: %v != %v", addr.EnsName, reverseName)}).Warnf("deleting ens entry") if !opts.DryRun { - _, err = db.WriterDb.Exec(`delete from ens where address = $1`, addr.Address) + _, err = db.WriterDb.Exec(`delete from ens where address = $1 and ens_name = $2`, addr.Address, addr.EnsName) if err != nil { return err }