From e973ebcc4352bff01792172ba24a522eb139e7e0 Mon Sep 17 00:00:00 2001 From: sheldon <997166273@qq.com> Date: Mon, 14 Nov 2022 11:08:27 +0800 Subject: [PATCH] unsafeClosePeers Convert all uppercase and lowercase to lowercase --- rpc/core/net.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/core/net.go b/rpc/core/net.go index 108a83e610f..f5242e6d4c9 100644 --- a/rpc/core/net.go +++ b/rpc/core/net.go @@ -54,7 +54,7 @@ func UnsafeDialSeeds(ctx *rpctypes.Context, seeds []string) (*ctypes.ResultDialS func UnsafeClosePeers(ctx *rpctypes.Context, peers []string) (*ctypes.ResultClosePeers, error) { peersSet := env.P2PPeers.Peers() for _, peer := range peers { - peerObj := peersSet.Get(p2p.ID(peer)) + peerObj := peersSet.Get(p2p.ID(strings.ToLower(peer))) if peerObj == nil || peerObj.ID() == "" { continue }