fix: improve log for ENR and print git hash on startup

This commit is contained in:
Richard Ramos 2022-05-05 14:13:14 -04:00
parent 281e932c56
commit 9845fea2a2
2 changed files with 4 additions and 2 deletions

View File

@ -213,7 +213,7 @@ func (d *DiscoveryV5) listen() error {
d.listener = listener
d.log.Info(fmt.Sprintf("Started Discovery V5 at %s:%d, advertising IP: %s:%d", d.udpAddr.IP, d.udpAddr.Port, d.localnode.Node().IP(), d.localnode.Node().TCP()))
d.log.Info("Discovery V5 ", d.localnode.Node())
d.log.Info("Discv5: discoverable ENR", d.localnode.Node())
return nil
}

View File

@ -235,7 +235,7 @@ func (w *WakuNode) logAddress(addr ma.Multiaddr) {
if err != nil {
w.log.Error("could not obtain ENR record from multiaddress", err)
} else {
w.log.Info(fmt.Sprintf("ENR for IP %s: %s", ip, enr))
w.log.Info(fmt.Sprintf("DNS: discoverable ENR for IP %s: %s", ip, enr))
}
}
}
@ -281,6 +281,8 @@ func (w *WakuNode) checkForAddressChanges() {
// Start initializes all the protocols that were setup in the WakuNode
func (w *WakuNode) Start() error {
w.log.Info("Version details ", "commit=", GitCommit)
w.swap = swap.NewWakuSwap(w.log, []swap.SwapOption{
swap.WithMode(w.opts.swapMode),
swap.WithThreshold(w.opts.swapPaymentThreshold, w.opts.swapDisconnectThreshold),