Skip to content

Commit

Permalink
Merge branch 'main' into andrew/rocksdb_pebbledb
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin authored Nov 6, 2023
2 parents 7581af2 + b8b8b6c commit 23ba229
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/fullnode/peer_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ type Peer struct {

// PrivatePeer returns the full private identifier of the peer in the format <node_id>@<private_address>:<port>.
func (peer Peer) PrivatePeer() string {
return string(peer.NodeID) + "@" + peer.PrivateAddress
return peer.NodeID + "@" + peer.PrivateAddress
}

// ExternalPeer returns the full external address of the peer in the format <node_id>@<external_address>:<port>.
func (peer Peer) ExternalPeer() string {
if peer.ExternalAddress == "" {
return string(peer.NodeID) + "@" + net.JoinHostPort("0.0.0.0", strconv.Itoa(p2pPort))
return peer.NodeID + "@" + net.JoinHostPort("0.0.0.0", strconv.Itoa(p2pPort))
}
return string(peer.NodeID) + "@" + peer.ExternalAddress
return peer.NodeID + "@" + peer.ExternalAddress
}

// Peers maps an ObjectKey using the instance name to Peer.
Expand Down Expand Up @@ -74,7 +74,7 @@ func (peers Peers) HasIncompleteExternalAddress() bool {

// NodeIDs returns a sorted list of all node IDs.
func (peers Peers) NodeIDs() []string {
ids := lo.Map(lo.Values(peers), func(p Peer, _ int) string { return string(p.NodeID) })
ids := lo.Map(lo.Values(peers), func(p Peer, _ int) string { return p.NodeID })
sort.Strings(ids)
return ids
}
Expand Down
2 changes: 1 addition & 1 deletion internal/fullnode/rbac_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestBuildRBAC(t *testing.T) {
{
APIGroups: []string{"cosmos.strange.love"},
Resources: []string{"cosmosfullnodes/status"},
Verbs: []string{"update"},
Verbs: []string{"patch"},
},
}, role.Rules)

Expand Down

0 comments on commit 23ba229

Please sign in to comment.