-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Implement chaincode event replay for Fabric Gateway #2896
Conversation
d1507f6
to
fbfec62
Compare
Signed-off-by: Mark S. Lewis <[email protected]>
fbfec62
to
7747938
Compare
internal/pkg/gateway/api.go
Outdated
if err != nil { | ||
return status.Error(codes.Unavailable, err.Error()) | ||
var startBlock uint64 | ||
switch seek := request.StartPosition.Type.(type) { |
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.
If StartPosition hasn't been specified in the request proto, then this will barf. Should we default to NextCommit in this case?
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.
Like you've done in the unit test :)
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.
I think I tried this and the protobuf unmarshalling failed because a oneof field wasn't defined in the message
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.
Having said that... the Golang protobuf docs have an example of switching on a oneof with nil
as a possible value, so let me try that again
https://developers.google.com/protocol-buffers/docs/reference/go-generated#oneof
cdfe7bd
to
72a39b4
Compare
Signed-off-by: Mark S. Lewis <[email protected]>
72a39b4
to
a6d586a
Compare
Resolves #2792