fabric-chaincode-node
fabric-chaincode-node copied to clipboard
Implement and test `getMultipleStates` method for Stub API.
trafficstars
Issue
#453
Description
This PR implements the getMultipleStates method to ChaincodeStub and includes the following updates:
- Implementation of
getMultipleStates(...keys)method to retrieve multiple state values from the given keys. - Handler support for this via
handleGetMultipleStatesandhandleOneSendGetMultipleStatesin handler.js. - Unit tests for
getMultipleStatesto verify:- It returns correct results when keys are provided.
- It returns an empty array when no keys are passed.
- It throws on handler rejection.
This method mirrors functionality found in fabric-chaincode-go