Skip to content

Commit

Permalink
post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Mar 22, 2024
1 parent e3a378e commit ac58d8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
9 changes: 0 additions & 9 deletions network/p2pNetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,6 @@ func (n *P2PNetwork) GetPeers(options ...PeerOption) []Peer {
n.log.Debugf("Archival node(s) from DHT: %v", addrs)
}
}
case PeersPhonebookArchivers:
// TODO: remove after merging with master
// temporary return all nodes
n.wsPeersLock.RLock()
for _, peer := range n.wsPeers {
peers = append(peers, Peer(peer))
}
n.wsPeersLock.RUnlock()

case PeersConnectedIn:
n.wsPeersLock.RLock()
for _, peer := range n.wsPeers {
Expand Down
2 changes: 1 addition & 1 deletion network/wsNetwork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ func TestGetPeers(t *testing.T) {
phbMulti.ReplacePeerList([]string{"a", "b", "c"}, "ph", phonebook.PhoneBookEntryRelayRole)

// A few for archival node roles
phbMulti.ReplacePeerList([]string{"d", "e", "f"}, "ph", PhoneBookEntryArchivalRole)
phbMulti.ReplacePeerList([]string{"d", "e", "f"}, "ph", phonebook.PhoneBookEntryArchivalRole)

//addrB, _ := netB.Address()

Expand Down
9 changes: 5 additions & 4 deletions rpcs/healthService_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
package rpcs

import (
"github.com/algorand/go-algorand/network"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"
"io"
"net/http"
"path"
"testing"

"github.com/algorand/go-algorand/network/addr"
"github.com/algorand/go-algorand/test/partitiontest"
"github.com/stretchr/testify/require"
)

func TestHealthService_ServeHTTP(t *testing.T) {
Expand All @@ -35,7 +36,7 @@ func TestHealthService_ServeHTTP(t *testing.T) {

_ = MakeHealthService(nodeA)

parsedURL, err := network.ParseHostOrURL(nodeA.rootURL())
parsedURL, err := addr.ParseHostOrURL(nodeA.rootURL())
require.NoError(t, err)

client := http.Client{}
Expand Down

0 comments on commit ac58d8e

Please sign in to comment.