From e1bdd5ba9fb9c7e90350b3c4ac656e099869ad2c Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Sun, 23 Jun 2024 14:19:00 -0600 Subject: [PATCH] add country code in query --- p2p/pex/addrbook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/pex/addrbook.go b/p2p/pex/addrbook.go index 5c64cad13ad..bd731eb534b 100644 --- a/p2p/pex/addrbook.go +++ b/p2p/pex/addrbook.go @@ -1160,7 +1160,7 @@ type ipInfo struct { } func getRegionFromIP(ip string) (string, error) { - req, err := http.Get(fmt.Sprintf("http://ip-api.com/json/%s?fields=status,country", ip)) + req, err := http.Get(fmt.Sprintf("http://ip-api.com/json/%s?fields=status,country,countryCode", ip)) if err != nil { return "", err }