Skip to content

Commit

Permalink
Merge pull request #497 from NilFoundation/fix-metrics
Browse files Browse the repository at this point in the history
[consensus] fix invalid metric usage
  • Loading branch information
olegrok authored Mar 7, 2025
2 parents 55b9ee8 + 40a6f01 commit 9a3d29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nil/internal/consensus/ibft/ibft.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ func (i *backendIBFT) buildSignature(committedSeals []*messages.CommittedSeal, h
}

func (i *backendIBFT) InsertProposal(proposal *protoIBFT.Proposal, committedSeals []*messages.CommittedSeal) {
i.mh.StartBuildProposalMeasurement(i.transportCtx, proposal.Round)
defer i.mh.EndBuildProposalMeasurement(i.transportCtx)
i.mh.StartInsertProposalMeasurement(i.transportCtx, proposal.Round)
defer i.mh.EndInsertProposalMeasurement(i.transportCtx)

proposalBlock, err := i.unmarshalProposal(proposal.RawProposal)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion nil/internal/consensus/ibft/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (mh *MetricsHandler) StartInsertProposalMeasurement(ctx context.Context, ro
mh.insertProposalMeasurer.Restart()
}

func (mh *MetricsHandler) EndInsertProposalMeasurement(ctx context.Context, height, round uint64) {
func (mh *MetricsHandler) EndInsertProposalMeasurement(ctx context.Context) {
mh.insertProposalMeasurer.Measure(ctx)
}

Expand Down

0 comments on commit 9a3d29c

Please sign in to comment.