Quickfix for toEnode that fails

This commit is contained in:
kdeme 2020-05-26 22:30:46 +02:00 committed by zah
parent a857168c38
commit 1ec7d6e168
1 changed files with 1 additions and 4 deletions

View File

@ -135,10 +135,7 @@ proc addBootstrapNode*(bootstrapAddr: string,
localPubKey: PublicKey) = localPubKey: PublicKey) =
let enrRes = parseBootstrapAddress(bootstrapAddr) let enrRes = parseBootstrapAddress(bootstrapAddr)
if enrRes.isOk: if enrRes.isOk:
let enodeRes = enrRes.value.toENode bootEnrs.add enrRes.value
if enodeRes.isOk:
if enodeRes.value.pubKey != localPubKey:
bootEnrs.add enrRes.value
else: else:
warn "Ignoring invalid bootstrap address", warn "Ignoring invalid bootstrap address",
bootstrapAddr, reason = enrRes.error bootstrapAddr, reason = enrRes.error