Skip to content

Commit

Permalink
[consensus] fix invalid metric usage
Browse files Browse the repository at this point in the history
  • Loading branch information
olegrok committed Mar 7, 2025
1 parent 0bb4565 commit 40a6f01
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 40a6f01

Please sign in to comment.