From 18765295f992fc51a2fa9e15d868ccd554fbad77 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:35:43 -0500 Subject: [PATCH] expose libp2p host for zetaclient connectivity monitoring --- tss/tss.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tss/tss.go b/tss/tss.go index 353bd2d..86e388a 100644 --- a/tss/tss.go +++ b/tss/tss.go @@ -11,6 +11,7 @@ import ( tcrypto "github.com/cometbft/cometbft/crypto" coskey "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" + "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" maddr "github.com/multiformats/go-multiaddr" "github.com/rs/zerolog" @@ -267,3 +268,8 @@ func (t *TssServer) GetKnownPeers() []peer.AddrInfo { } return infos } + +// GetP2PHost return the libp2p host of the Communicator inside TssServer +func (t *TssServer) GetP2PHost() host.Host { + return t.p2pCommunication.GetHost() +}