mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-08-11 03:13:11 +00:00
Remove warnings from check_spr tool
For each SPR tested, there was a warning "No external IP provided for the SPR, this node will not be discoverable" which is irrelevant to the test. An enrIp paramater was provided to the discv5 protocol constructor, to workaround this warning.
This commit is contained in:
parent
50ac0d82fe
commit
f6b8463b5c
@ -23,7 +23,7 @@
|
||||
##
|
||||
## Run `check_spr --help` for a full description of every option.
|
||||
|
||||
import std/[json, options, os, sequtils, strutils, typetraits, strformat, terminal]
|
||||
import std/[json, net, options, os, sequtils, strutils, typetraits, strformat, terminal]
|
||||
|
||||
import pkg/chronicles
|
||||
import pkg/chronos
|
||||
@ -119,8 +119,11 @@ proc checkDiscv5(
|
||||
let rng = newRng()
|
||||
let privKey = PrivateKey.random(rng).tryGet()
|
||||
let proto = discv5.newProtocol(
|
||||
privKey, none(IpAddress), none(Port), none(Port), bindPort = Port(0), rng = rng
|
||||
privKey, IPv4_any().some, none(Port), none(Port), bindPort = Port(0), rng = rng
|
||||
)
|
||||
# Use IPv4_any address as the enrIp param in newProtocol to avoid the
|
||||
# warnings. It changes the SPR of the discv5 protocol ping tool (this), but
|
||||
# does not affect the SPRs of the target.
|
||||
|
||||
try:
|
||||
proto.open()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user