mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-23 01:55:10 +00:00
PDCs test in progress Jan 24 2023
This commit is contained in:
parent
e87473cefb
commit
449c10f6ed
2 changed files with 7 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
0
test-network/snippet.go
Normal file
0
test-network/snippet.go
Normal file
Loading…
Reference in a new issue