From 723b33e1087486c1cd830d202a1554b2a4448463 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 10 Jan 2020 15:16:14 +0300 Subject: [PATCH] network: implement unconnected/bad peers getters Which allows node to respond to `getpeers` RPC request correctly. --- pkg/network/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/network/server.go b/pkg/network/server.go index 3772a6018..cfe241d9f 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -190,12 +190,12 @@ func (s *Server) Shutdown() { // UnconnectedPeers returns a list of peers that are in the discovery peer list // but are not connected to the server. func (s *Server) UnconnectedPeers() []string { - return []string{} + return s.discovery.UnconnectedPeers() } // BadPeers returns a list of peers the are flagged as "bad" peers. func (s *Server) BadPeers() []string { - return []string{} + return s.discovery.BadPeers() } // ConnectedPeers returns a list of currently connected peers.