-
Notifications
You must be signed in to change notification settings - Fork 72
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
add support GetMultipleKeys #248
Conversation
peer/chaincode_shim.proto
Outdated
message GetStateMiltiple { | ||
repeated string keys = 1; | ||
string collection = 2; | ||
} |
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.
Should this be GetStateMultiple
? Could it use a repeated GetState
field, or is there a limitation that all the reads need to be from the same collection?
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.
The ledger fabric already has an implementation of these functions. So I decided to replicate them as close to the implementation as possible. And it is implemented only for one collection.
https://github.com/hyperledger/fabric/blob/main/core/ledger/ledger_interface.go#L257
https://github.com/hyperledger/fabric/blob/main/core/ledger/ledger_interface.go#L283
Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
877e0d7
to
8864af8
Compare
Do you want to include PutStateMultiple in the same PR? I always viewed them as a pair. |
No, because we already have WriteBatch, which fully covers the PutStateMultiple functionality, and is more universal. |
Ah right |
@pfi79 Shall I proceed with merge and a release? Question, once Fabric has both the new features implemented, shall we proceed with a Fabric v3.1.0 release? |
Yeah, I think it can be infused and tag released already. |
I think it's a good idea. I have the code all ready to go, but it needs to be taken carefully. Otherwise, there will be, as in this pr, a typo discovered (thanks @bestbeforetoday for discovering it) |
hyperledger/fabric#5116