PDCs test in progress Jan 24 2023

This commit is contained in:
Fernando Garzon 2023-01-24 15:33:59 -08:00
parent e87473cefb
commit 449c10f6ed
2 changed files with 7 additions and 1 deletions

View file

@ -38,6 +38,12 @@ type Data struct {
JsonFileContent map[string]interface{} JsonFileContent map[string]interface{}
} }
type PrivateDataContent struc {
Id string `json:"Id"`
AnonymousFunder string `json:"AnonymousFunder"`
AssetValue string `json:"AssetValue"`
}
type Schema struct { type Schema struct {
Version int `json:"Version"` Version int `json:"Version"`
Hash string `json:"Hash"` 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. // CreateDataSample issues a new Data Sample to the world state with given details.
func (s *SmartContract) CreateDataSample(ctx contractapi.TransactionContextInterface, 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) ContentHash, _ := s.Hash(ctx, JsonFileContent)
exists, err := s.AssetExists(ctx, ContentHash) exists, err := s.AssetExists(ctx, ContentHash)

0
test-network/snippet.go Normal file
View file