Skip to content

Commit

Permalink
Fix protoc-gen-go version, flag description and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoSantoss committed Dec 17, 2024
1 parent 145c5cc commit fcece14
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 88 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type Config struct {
TestnetConfig eth2util.Network
ProcDirectory string
ConsensusProtocol string
Nickname string
Nickname string

TestConfig TestConfig
}
Expand Down
8 changes: 4 additions & 4 deletions app/peerinfo/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ var (
}, []string{"peer"})

peerNickname = promauto.NewResetGaugeVec(prometheus.GaugeOpts{
Namespace: "app",
Subsystem: "peerinfo",
Name: "nickname",
Help: "Constant gauge with nickname label set to peer's charon nickname.",
Namespace: "app",
Subsystem: "peerinfo",
Name: "nickname",
Help: "Constant gauge with nickname label set to peer's charon nickname.",
ConstLabels: nil,
}, []string{"peer", "nickname"})
)
2 changes: 1 addition & 1 deletion app/peerinfo/peerinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func newInternal(tcpNode host.Host, peers []peer.ID, version version.SemVer, loc
SentAt: timestamppb.New(nowFunc()),
StartedAt: startTime,
BuilderApiEnabled: builderAPIEnabled,
Nickname: nickname,
Nickname: nickname,
}, true, nil
},
)
Expand Down
144 changes: 65 additions & 79 deletions app/peerinfo/peerinfopb/v1/peerinfo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func bindRunFlags(cmd *cobra.Command, config *app.Config) {
cmd.Flags().StringVar(&config.TestnetConfig.CapellaHardFork, "testnet-capella-hard-fork", "", "Capella hard fork version of the custom test network.")
cmd.Flags().StringVar(&config.ProcDirectory, "proc-directory", "", "Directory to look into in order to detect other stack components running on the host.")
cmd.Flags().StringVar(&config.ConsensusProtocol, "consensus-protocol", "", "Preferred consensus protocol name for the node. Selected automatically when not specified.")
cmd.Flags().StringVar(&config.Nickname,"nickname","","Human readable peer nickname. Maximum 32 characters.")
cmd.Flags().StringVar(&config.Nickname, "nickname", "", "Human friendly peer nickname. Maximum 32 characters.")

wrapPreRunE(cmd, func(*cobra.Command, []string) error {
if len(config.BeaconNodeAddrs) == 0 && !config.SimnetBMock {
Expand Down
4 changes: 2 additions & 2 deletions dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ func setupP2P(ctx context.Context, key *k1.PrivateKey, conf Config, peers []p2p.

// Register peerinfo server handler for identification to relays (but do not run peerinfo client).
gitHash, _ := version.GitCommit()
// TODO: PeerNickname empty for now, should come from CLI flag
_ = peerinfo.New(tcpNode, peerIDs, version.Version, defHash, gitHash, nil, false ,"")

_ = peerinfo.New(tcpNode, peerIDs, version.Version, defHash, gitHash, nil, false, "")

return tcpNode, func() {
_ = tcpNode.Close()
Expand Down

0 comments on commit fcece14

Please sign in to comment.