}) }) Describe("Ledger GetSetMultipleKeys", func() { ledgerPtr := InitSpec() It("creates, populates, finishes, commits and validates a batch", func() { Expect(ledgerPtr.BeginTxBatch(1)).To(BeNil()) ledgerPtr.TxBegin("txUuid1") ledgerPtr.SetStateMultipleKeys("chaincodeID", map[string][]byte{"key1": []byte("value1"), "key2": []byte("value2")}) ledgerPtr.TxFinished("txUuid1", true) uuid := util.GenerateUUID() tx, err := protos.NewTransaction(protos.ChaincodeID{Path: "testUrl"}, uuid, "anyfunction", []string{"param1, param2"}) Expect(err).To(BeNil()) err = ledgerPtr.CommitTxBatch(1, []*protos.Transaction{tx}, nil, []byte("proof")) Expect(err).To(BeNil()) values, err := ledgerPtr.GetStateMultipleKeys("chaincodeID", []string{"key1", "key2"}, true) Expect(err).To(BeNil()) Expect(values).To(Equal([][]byte{[]byte("value1"), []byte("value2")})) }) }) Describe("Ledger CopyState", func() { ledgerPtr := InitSpec() It("creates, populates, finishes, commits and validates a batch", func() { Expect(ledgerPtr.BeginTxBatch(0)).To(BeNil()) ledgerPtr.TxBegin("txUuid1") ledgerPtr.SetStateMultipleKeys("chaincodeID", map[string][]byte{"key1": []byte("value1"), "key2": []byte("value2")}) ledgerPtr.TxFinished("txUuid1", true) uuid := util.GenerateUUID() tx, err := protos.NewTransaction(protos.ChaincodeID{Path: "testUrl"}, uuid, "anyfunction", []string{"param1, param2"}) Expect(err).To(BeNil())