From ad3ebe069308134871d221008cd050654b8d5483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:24:24 +0800 Subject: [PATCH 1/2] update deprecated go-libp2p packages --- api/service/legacysync/syncing_test.go | 2 +- p2p/host.go | 4 ++-- p2p/stream/types/utils.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/service/legacysync/syncing_test.go b/api/service/legacysync/syncing_test.go index bc17aeaec..7d99051c7 100644 --- a/api/service/legacysync/syncing_test.go +++ b/api/service/legacysync/syncing_test.go @@ -12,7 +12,7 @@ import ( "time" nodeconfig "github.com/harmony-one/harmony/internal/configs/node" - peer "github.com/libp2p/go-libp2p-core/peer" + peer "github.com/libp2p/go-libp2p/core/peer" "github.com/ethereum/go-ethereum/common" "github.com/harmony-one/harmony/api/service/legacysync/downloader" diff --git a/p2p/host.go b/p2p/host.go index 9395e1df4..194c7cda2 100644 --- a/p2p/host.go +++ b/p2p/host.go @@ -12,8 +12,8 @@ import ( "time" "github.com/libp2p/go-libp2p" - "github.com/libp2p/go-libp2p-core/host" - "github.com/libp2p/go-libp2p-core/routing" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/routing" dht "github.com/libp2p/go-libp2p-kad-dht" libp2p_pubsub "github.com/libp2p/go-libp2p-pubsub" libp2p_config "github.com/libp2p/go-libp2p/config" diff --git a/p2p/stream/types/utils.go b/p2p/stream/types/utils.go index c27d95d60..72838222b 100644 --- a/p2p/stream/types/utils.go +++ b/p2p/stream/types/utils.go @@ -11,7 +11,7 @@ import ( nodeconfig "github.com/harmony-one/harmony/internal/configs/node" "github.com/hashicorp/go-version" - libp2p_proto "github.com/libp2p/go-libp2p-core/protocol" + libp2p_proto "github.com/libp2p/go-libp2p/core/protocol" "github.com/pkg/errors" ) From 8b801ab249991e385a3d76bc5967353e43d61a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Fri, 4 Aug 2023 07:36:13 +0800 Subject: [PATCH 2/2] goimports --- p2p/host.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/host.go b/p2p/host.go index 194c7cda2..246b598b2 100644 --- a/p2p/host.go +++ b/p2p/host.go @@ -12,17 +12,17 @@ import ( "time" "github.com/libp2p/go-libp2p" - "github.com/libp2p/go-libp2p/core/host" - "github.com/libp2p/go-libp2p/core/routing" dht "github.com/libp2p/go-libp2p-kad-dht" libp2p_pubsub "github.com/libp2p/go-libp2p-pubsub" libp2p_config "github.com/libp2p/go-libp2p/config" libp2p_crypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/host" libp2p_host "github.com/libp2p/go-libp2p/core/host" libp2p_network "github.com/libp2p/go-libp2p/core/network" libp2p_peer "github.com/libp2p/go-libp2p/core/peer" libp2p_peerstore "github.com/libp2p/go-libp2p/core/peerstore" "github.com/libp2p/go-libp2p/core/protocol" + "github.com/libp2p/go-libp2p/core/routing" "github.com/libp2p/go-libp2p/p2p/net/connmgr" "github.com/libp2p/go-libp2p/p2p/security/noise"