Merge pull request #3360 from filecoin-project/fix/dont-fail-drand-dns

Don't fail if could not resolve drand dnsaddr
This commit is contained in:
Łukasz Magiera 2020-08-28 00:13:07 +02:00 committed by GitHub
commit 010e32d778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,13 @@ func BuiltinBootstrap() (dtypes.BootstrapPeers, error) {
}
func DrandBootstrap(d dtypes.DrandConfig) (dtypes.DrandBootstrap, error) {
return addrutil.ParseAddresses(context.TODO(), d.Relays)
// TODO: retry resolving, don't fail if at least one resolve succeeds
addrs, err := addrutil.ParseAddresses(context.TODO(), d.Relays)
if err != nil {
log.Errorf("reoslving drand relays addresses: %+v", err)
return nil, nil
}
return addrs, nil
}
func SetupJournal(lr repo.LockedRepo) error {