Skip to content

Commit

Permalink
(NOBIDS) also consider reverted executions when validating ens addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed Feb 27, 2024
1 parent 4c703d9 commit ab8c8e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/ens.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func validateEnsAddress(client *ethclient.Client, address common.Address, alread

name, err := go_ens.ReverseResolve(client, address)
if err != nil {
if err.Error() == "not a resolver" || err.Error() == "no resolution" {
if err.Error() == "not a resolver" || err.Error() == "no resolution" || err.Error() == "execution reverted" {
logger.Warnf("reverse resolving address [%v] resulted in a skippable error [%s], skipping it", address, err.Error())
return nil
}
Expand Down Expand Up @@ -545,7 +545,7 @@ func validateEnsName(client *ethclient.Client, name string, alreadyChecked *EnsC
if isPrimaryName == nil {
reverseName, err := go_ens.ReverseResolve(client, addr)
if err != nil {
if err.Error() == "not a resolver" || err.Error() == "no resolution" {
if err.Error() == "not a resolver" || err.Error() == "no resolution" || err.Error() == "execution reverted" {
logger.Warnf("reverse resolving address [%v] for name [%v] resulted in an error [%s], marking entry as not primary", addr, name, err.Error())
} else {
return fmt.Errorf("error could not reverse resolve address [%v]: %w", addr, err)
Expand Down

0 comments on commit ab8c8e9

Please sign in to comment.