@@ -93,23 +93,41 @@ func IssueCash(network *integration.Infrastructure, wallet string, typ token.Typ
9393}
9494
9595func IssueSuccessfulCash (network * integration.Infrastructure , wallet string , typ token.Type , amount uint64 , receiver * token3.NodeReference , auditor * token3.NodeReference , anonymous bool , issuer * token3.NodeReference , finalities ... * token3.NodeReference ) string {
96- return issueCashForTMSID (network , wallet , typ , amount , receiver , auditor , anonymous , issuer , nil , finalities , []string {})
96+ return issueCashForTMSID (network , wallet , typ , amount , receiver , auditor , anonymous , issuer , nil , finalities , false , []string {})
9797}
9898
9999func IssueCashForTMSID (network * integration.Infrastructure , wallet string , typ token.Type , amount uint64 , receiver * token3.NodeReference , auditor * token3.NodeReference , anonymous bool , issuer * token3.NodeReference , tmsId * token2.TMSID , expectedErrorMsgs ... string ) string {
100- return issueCashForTMSID (network , wallet , typ , amount , receiver , auditor , anonymous , issuer , tmsId , []* token3.NodeReference {}, expectedErrorMsgs )
101- }
102-
103- func issueCashForTMSID (network * integration.Infrastructure , wallet string , typ token.Type , amount uint64 , receiver * token3.NodeReference , auditor * token3.NodeReference , anonymous bool , issuer * token3.NodeReference , tmsId * token2.TMSID , endorsers []* token3.NodeReference , expectedErrorMsgs []string ) string {
100+ return issueCashForTMSID (network , wallet , typ , amount , receiver , auditor , anonymous , issuer , tmsId , []* token3.NodeReference {}, false , expectedErrorMsgs )
101+ }
102+
103+ func IssueCashWithNoAuditorSigVerification (network * integration.Infrastructure , wallet string , typ token.Type , amount uint64 , receiver * token3.NodeReference , auditor * token3.NodeReference , anonymous bool , issuer * token3.NodeReference , expectedErrorMsgs ... string ) string {
104+ return issueCashForTMSID (network , wallet , typ , amount , receiver , auditor , anonymous , issuer , nil , []* token3.NodeReference {}, true , expectedErrorMsgs )
105+ }
106+
107+ func issueCashForTMSID (
108+ network * integration.Infrastructure ,
109+ wallet string ,
110+ typ token.Type ,
111+ amount uint64 ,
112+ receiver * token3.NodeReference ,
113+ auditor * token3.NodeReference ,
114+ anonymous bool ,
115+ issuer * token3.NodeReference ,
116+ tmsId * token2.TMSID ,
117+ endorsers []* token3.NodeReference ,
118+ skipAuditorSignatureVerification bool ,
119+ expectedErrorMsgs []string ,
120+ ) string {
104121 txIDBoxed , err := network .Client (issuer .ReplicaName ()).CallView ("issue" , common .JSONMarshall (& views.IssueCash {
105- Anonymous : anonymous ,
106- Auditor : auditor .Id (),
107- IssuerWallet : wallet ,
108- TokenType : typ ,
109- Quantity : amount ,
110- Recipient : network .Identity (receiver .Id ()),
111- RecipientEID : receiver .Id (),
112- TMSID : tmsId ,
122+ Anonymous : anonymous ,
123+ Auditor : auditor .Id (),
124+ IssuerWallet : wallet ,
125+ TokenType : typ ,
126+ Quantity : amount ,
127+ Recipient : network .Identity (receiver .Id ()),
128+ RecipientEID : receiver .Id (),
129+ TMSID : tmsId ,
130+ SkipAuditorSignatureVerification : skipAuditorSignatureVerification ,
113131 }))
114132
115133 topology .ToOptions (network .FscPlatform .Peers [0 ].Options ).Endorser ()
@@ -1369,10 +1387,10 @@ func MultiSigSpendCashForTMSID(network *integration.Infrastructure, sender *toke
13691387
13701388}
13711389
1372- func PrepareUpdatedPublicParams (network * integration.Infrastructure , auditor string , networkName string ) []byte {
1390+ func PrepareUpdatedPublicParams (network * integration.Infrastructure , auditor string , issuer string , networkName string , appendIdentities bool ) []byte {
13731391 tms := GetTMSByNetworkName (network , networkName )
13741392 auditorId := GetAuditorIdentity (tms , auditor )
1375- issuerId := GetIssuerIdentity (tms , "newIssuer" )
1393+ issuerId := GetIssuerIdentity (tms , issuer )
13761394
13771395 tokenPlatform , ok := network .Ctx .PlatformsByName ["token" ].(* tplatform.Platform )
13781396 Expect (ok ).To (BeTrue (), "failed to get token platform from context" )
@@ -1389,6 +1407,8 @@ func PrepareUpdatedPublicParams(network *integration.Infrastructure, auditor str
13891407 Serialize () ([]byte , error )
13901408 SetIssuers (identities []driver.Identity )
13911409 SetAuditors (identities []driver.Identity )
1410+ AddAuditor (identity2 driver.Identity )
1411+ AddIssuer (identity2 driver.Identity )
13921412 }
13931413 var pp PP
13941414 switch genericPP .Identifier {
@@ -1399,12 +1419,17 @@ func PrepareUpdatedPublicParams(network *integration.Infrastructure, auditor str
13991419 pp , err = fabtokenv1 .NewPublicParamsFromBytes (ppBytes , fabtokenv1 .PublicParameters )
14001420 Expect (err ).NotTo (HaveOccurred ())
14011421 default :
1402- Expect (false ).To (BeTrue (), "unknown pp identitfier [%s]" , genericPP .Identifier )
1422+ Expect (false ).To (BeTrue (), "unknown pp identifier [%s]" , genericPP .Identifier )
14031423 }
14041424
14051425 Expect (pp .Validate ()).NotTo (HaveOccurred ())
1406- pp .SetAuditors ([]driver.Identity {auditorId })
1407- pp .SetIssuers ([]driver.Identity {issuerId })
1426+ if appendIdentities {
1427+ pp .AddAuditor (auditorId )
1428+ pp .AddIssuer (issuerId )
1429+ } else {
1430+ pp .SetAuditors ([]driver.Identity {auditorId })
1431+ pp .SetIssuers ([]driver.Identity {issuerId })
1432+ }
14081433
14091434 // Serialize
14101435 ppBytes , err = pp .Serialize ()
0 commit comments