public List <ChaincodeMessage> Next() { List <KeyModification> keyModifications = values.Select(a => new KeyModification { TxId = a, Value = ByteString.CopyFromUtf8(a + " Value") }).ToList(); QueryResponse qr = new QueryResponse { HasMore = hasNext }; qr.Results.Add(keyModifications.Select(a => new QueryResultBytes { ResultBytes = a.ToByteString() })); ByteString historyPayload = qr.ToByteString(); List <ChaincodeMessage> list = new List <ChaincodeMessage>(); list.Add(new ChaincodeMessage { Type = ChaincodeMessage.Types.Type.Response, ChannelId = orgMsg.ChannelId, Txid = orgMsg.Txid, Payload = historyPayload }); return(list); }