feat: add logging of S5 identity

This commit is contained in:
Derrick Hammer 2024-01-12 10:16:04 -05:00
parent ab6b71813d
commit 866fa89cee
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 15 additions and 1 deletions

View File

@ -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