-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: consume finality provider event #10
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.
Lgtm! Mostly nits
@@ -3,7 +3,7 @@ module github.com/babylonlabs-io/babylon-staking-indexer | |||
go 1.23.2 | |||
|
|||
require ( | |||
github.com/babylonlabs-io/babylon v0.11.0 | |||
github.com/babylonlabs-io/babylon v0.12.0 |
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.
can change to babylonlabs-io/babylon@86f6bc5 which includes format change
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.
@gitferry Require BBN bump to newer version first. Since this repo is WIP as well. I'm not in a hurry to use commit based, we can wait for BBN till released a newer version
if err != nil { | ||
return err | ||
} | ||
if res.MatchedCount == 0 { |
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.
seems strange to check this for object not found
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.
this is the response type from the UpdateOne
method
// UpdateResult is the result type returned from UpdateOne, UpdateMany, and ReplaceOne operations.
type UpdateResult struct {
MatchedCount int64 // The number of documents matched by the filter.
ModifiedCount int64 // The number of documents modified by the operation.
UpsertedCount int64 // The number of documents upserted by the operation.
UpsertedID interface{} // The _id field of the upserted document, or nil if no upsert was done.
}
This is because we could end up with not updating anything if nothing was found. Mongodb does not throw error
540adac
to
564dd26
Compare
No description provided.