-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor maybePersistBlockchainEvent
to Return a Boolean Indicating Event Creation Status
#1559
Refactor maybePersistBlockchainEvent
to Return a Boolean Indicating Event Creation Status
#1559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - a few comments
…f the event was created Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Co-authored-by: Enrique Lacal <enriquelacal@gmail.com> Signed-off-by: David Wertenteil <david.wertenteil@kaleido.io> Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
3ea58f8
to
55cf059
Compare
@dwertent just build failing because of the copyright date, we can probably write a small command to update the ones modified |
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
Re-ran the build to upload the code coverage as the repo was deactivated in CodeCov for some reason... |
@dwertent more copyright failures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1559 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 325 325
Lines 24049 24055 +6
=========================================
+ Hits 24049 24055 +6 ☔ View full report in Codecov by Sentry. |
@EnriqueL8 I think we said we would merge this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good to go!
Overview
This PR refactors the
maybePersistBlockchainEvent()
function to return a boolean indicating whether a blockchain event was newly created. This change prevents the double-counting of metrics by ensuring thatemitBlockchainEventMetric()
is only called for new events.Fixes #1294.