Incerase verified count when ENS name does not verify

In some cases no error is returned but the name is not verified.
Before this ENS names would get verified again every 30s.
This commit changes the logic so that if they fail to verify without
error they will still exponentially backoff.
This commit is contained in:
Andrea Maria Piana 2020-11-06 14:02:50 +01:00
parent d20cf2583f
commit f10e70ce96
1 changed files with 4 additions and 0 deletions

View File

@ -2744,6 +2744,10 @@ func (m *Messenger) VerifyENSNames(ctx context.Context, rpcEndpoint, contractAdd
if details.Error == nil {
contact.ENSVerified = details.Verified
// Increment count if not verified, even if no error
if !details.Verified {
contact.ENSVerificationRetries++
}
m.allContacts[contact.ID] = contact
} else {
m.logger.Warn("Failed to resolve ens name",