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 authored Aug 23, 2024
1 parent 977c78a commit 25d2961
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-pumas-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal add head report chain_id
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 25d2961

Please sign in to comment.