Skip to content

Commit

Permalink
fix: head report chain_id (#14212)
Browse files Browse the repository at this point in the history
* fix: head report chain_id

* test
  • Loading branch information
bukata-sa committed Oct 22, 2024
1 parent f5a36e3 commit bf9f043
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
1 change: 1 addition & 0 deletions core/services/headreporter/telemetry_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (t *telemetryReporter) ReportNewHead(ctx context.Context, head *evmtypes.He
}
}
request := &telem.HeadReportRequest{
ChainID: head.EVMChainID.String(),
Latest: &telem.Block{
Timestamp: uint64(head.Timestamp.UTC().Unix()),
Number: uint64(head.Number),
Expand Down
2 changes: 2 additions & 0 deletions core/services/headreporter/telemetry_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func Test_TelemetryReporter_NewHead(t *testing.T) {
},
}
requestBytes, err := proto.Marshal(&telem.HeadReportRequest{
ChainID: "100",
Latest: &telem.Block{
Timestamp: uint64(head.Timestamp.UTC().Unix()),
Number: 42,
Expand Down Expand Up @@ -70,6 +71,7 @@ func Test_TelemetryReporter_NewHeadMissingFinalized(t *testing.T) {
IsFinalized: false,
}
requestBytes, err := proto.Marshal(&telem.HeadReportRequest{
ChainID: "100",
Latest: &telem.Block{
Timestamp: uint64(head.Timestamp.UTC().Unix()),
Number: 42,
Expand Down
47 changes: 24 additions & 23 deletions core/services/synchronization/telem/telem_head_report.pb.go

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

0 comments on commit bf9f043

Please sign in to comment.