From 866fa89cee1d5ec20514df15d9b5c596171dee19 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 12 Jan 2024 10:16:04 -0500 Subject: [PATCH] feat: add logging of S5 identity --- protocols/s5.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/protocols/s5.go b/protocols/s5.go index 024b56b..46a7c56 100644 --- a/protocols/s5.go +++ b/protocols/s5.go @@ -85,7 +85,21 @@ func (s *S5Protocol) Initialize(portal interfaces.Portal) error { return nil } func (s *S5Protocol) Start() error { - return s.node.Start() + err := s.node.Start() + if err != nil { + return err + } + + identity, err := s.node.Services().P2P().NodeId().ToString() + + if err != nil { + return err + } + + s.portal.Logger().Info("S5 protocol started") + s.portal.Logger().Info("S5 protocol identity", zap.String("identity", identity)) + + return nil } func (s *S5Protocol) Node() s5interfaces.Node { return s.node