From 449c10f6ed47b3d0e6a4d1f1dc1c2426da87a25b Mon Sep 17 00:00:00 2001 From: Fernando Garzon Date: Tue, 24 Jan 2023 15:33:59 -0800 Subject: [PATCH] PDCs test in progress Jan 24 2023 --- .../chaincode-go/chaincode/smartcontract.go | 8 +++++++- test-network/snippet.go | 0 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test-network/snippet.go diff --git a/asset-transfer-basic/chaincode-go/chaincode/smartcontract.go b/asset-transfer-basic/chaincode-go/chaincode/smartcontract.go index ffdd2387..43d7d94b 100644 --- a/asset-transfer-basic/chaincode-go/chaincode/smartcontract.go +++ b/asset-transfer-basic/chaincode-go/chaincode/smartcontract.go @@ -38,6 +38,12 @@ type Data struct { JsonFileContent map[string]interface{} } +type PrivateDataContent struc { + Id string `json:"Id"` + AnonymousFunder string `json:"AnonymousFunder"` + AssetValue string `json:"AssetValue"` +} + type Schema struct { Version int `json:"Version"` Hash string `json:"Hash"` @@ -363,7 +369,7 @@ func (s *SmartContract) ValidJson(ctx contractapi.TransactionContextInterface, J // CreateDataSample issues a new Data Sample to the world state with given details. func (s *SmartContract) CreateDataSample(ctx contractapi.TransactionContextInterface, - Contributor string, ContributorId string, Id string, Owner string, JsonFileContent string) error { + Contributor string, ContributorId string, Id string, Owner string, JsonFileContent string, AnonymousFunder string, AssetValue string) error { ContentHash, _ := s.Hash(ctx, JsonFileContent) exists, err := s.AssetExists(ctx, ContentHash) diff --git a/test-network/snippet.go b/test-network/snippet.go new file mode 100644 index 00000000..e69de29b