@@ -236,7 +236,7 @@ func getDeployLCCCSpec(chainID string, cds *pb.ChaincodeDeploymentSpec) (*pb.Cha
236
236
}
237
237
238
238
//wrap the deployment in an invocation spec to lccc...
239
- lcccSpec := & pb.ChaincodeInvocationSpec {ChaincodeSpec : & pb.ChaincodeSpec {Type : pb .ChaincodeSpec_GOLANG , ChaincodeID : & pb.ChaincodeID {Name : "lccc" }, CtorMsg : & pb.ChaincodeInput {Args : [][]byte {[]byte ("deploy" ), []byte (chainID ), b }}}}
239
+ lcccSpec := & pb.ChaincodeInvocationSpec {ChaincodeSpec : & pb.ChaincodeSpec {Type : pb .ChaincodeSpec_GOLANG , ChaincodeID : & pb.ChaincodeID {Name : "lccc" }, Input : & pb.ChaincodeInput {Args : [][]byte {[]byte ("deploy" ), []byte (chainID ), b }}}}
240
240
241
241
return lcccSpec , nil
242
242
}
@@ -351,7 +351,7 @@ func executeDeployTransaction(t *testing.T, chainID string, name string, url str
351
351
352
352
f := "init"
353
353
args := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
354
- spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : & pb.ChaincodeID {Name : name , Path : url }, CtorMsg : & pb.ChaincodeInput {Args : args }}
354
+ spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : & pb.ChaincodeID {Name : name , Path : url }, Input : & pb.ChaincodeInput {Args : args }}
355
355
356
356
cccid := NewCCContext (chainID , name , "0" , "" , false , nil )
357
357
@@ -378,7 +378,7 @@ func chaincodeQueryChaincode(chainID string, user string) error {
378
378
f := "init"
379
379
args := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
380
380
381
- spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , CtorMsg : & pb.ChaincodeInput {Args : args }}
381
+ spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , Input : & pb.ChaincodeInput {Args : args }}
382
382
383
383
cccid1 := NewCCContext (chainID , "example02" , "0" , "" , false , nil )
384
384
@@ -399,7 +399,7 @@ func chaincodeQueryChaincode(chainID string, user string) error {
399
399
f = "init"
400
400
args = util .ToChaincodeArgs (f , "sum" , "0" )
401
401
402
- spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
402
+ spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
403
403
404
404
cccid2 := NewCCContext (chainID , "example05" , "0" , "" , false , nil )
405
405
@@ -417,7 +417,7 @@ func chaincodeQueryChaincode(chainID string, user string) error {
417
417
f = "invoke"
418
418
args = util .ToChaincodeArgs (f , chaincodeID1 , "sum" )
419
419
420
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
420
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
421
421
// Invoke chaincode
422
422
var retVal []byte
423
423
_ , _ , retVal , err = invoke (ctxt , chainID , spec2 )
@@ -440,7 +440,7 @@ func chaincodeQueryChaincode(chainID string, user string) error {
440
440
f = "query"
441
441
args = util .ToChaincodeArgs (f , chaincodeID1 , "sum" )
442
442
443
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
443
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
444
444
// Invoke chaincode
445
445
_ , _ , retVal , err = invoke (ctxt , chainID , spec2 )
446
446
@@ -539,7 +539,7 @@ func invokeExample02Transaction(ctxt context.Context, cccid *CCContext, cID *pb.
539
539
540
540
f := "init"
541
541
argsDeploy := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
542
- spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : argsDeploy }}
542
+ spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : argsDeploy }}
543
543
_ , err := deploy (ctxt , cccid , spec )
544
544
chaincodeID := spec .ChaincodeID .Name
545
545
if err != nil {
@@ -561,7 +561,7 @@ func invokeExample02Transaction(ctxt context.Context, cccid *CCContext, cID *pb.
561
561
562
562
f = "invoke"
563
563
invokeArgs := append ([]string {f }, args ... )
564
- spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : util .ToChaincodeArgs (invokeArgs ... )}}
564
+ spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : util .ToChaincodeArgs (invokeArgs ... )}}
565
565
_ , uuid , _ , err := invoke (ctxt , cccid .ChainID , spec )
566
566
if err != nil {
567
567
return fmt .Errorf ("Error invoking <%s>: %s" , cccid .Name , err )
@@ -576,7 +576,7 @@ func invokeExample02Transaction(ctxt context.Context, cccid *CCContext, cID *pb.
576
576
// Test for delete state
577
577
f = "delete"
578
578
delArgs := util .ToChaincodeArgs (f , "a" )
579
- spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : delArgs }}
579
+ spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : delArgs }}
580
580
_ , uuid , _ , err = invoke (ctxt , cccid .ChainID , spec )
581
581
if err != nil {
582
582
return fmt .Errorf ("Error deleting state in <%s>: %s" , cccid .Name , err )
@@ -687,7 +687,7 @@ func chaincodeInvokeChaincode(t *testing.T, chainID string, user string) (err er
687
687
f := "init"
688
688
args := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
689
689
690
- spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , CtorMsg : & pb.ChaincodeInput {Args : args }}
690
+ spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , Input : & pb.ChaincodeInput {Args : args }}
691
691
692
692
cccid1 := NewCCContext (chainID , "example02" , "0" , "" , false , nil )
693
693
@@ -711,7 +711,7 @@ func chaincodeInvokeChaincode(t *testing.T, chainID string, user string) (err er
711
711
f = "init"
712
712
args = util .ToChaincodeArgs (f , "e" , "0" )
713
713
714
- spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
714
+ spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
715
715
716
716
cccid2 := NewCCContext (chainID , "example04" , "0" , "" , false , nil )
717
717
@@ -733,7 +733,7 @@ func chaincodeInvokeChaincode(t *testing.T, chainID string, user string) (err er
733
733
cid := spec1 .ChaincodeID .Name
734
734
args = util .ToChaincodeArgs (f , cid , "e" , "1" )
735
735
736
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
736
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
737
737
// Invoke chaincode
738
738
var uuid string
739
739
_ , uuid , _ , err = invoke (ctxt , chainID , spec2 )
@@ -786,7 +786,7 @@ func TestChaincodeInvokeChaincodeErrorCase(t *testing.T) {
786
786
f := "init"
787
787
args := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
788
788
789
- spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , CtorMsg : & pb.ChaincodeInput {Args : args }}
789
+ spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , Input : & pb.ChaincodeInput {Args : args }}
790
790
791
791
cccid1 := NewCCContext (chainID , "example02" , "0" , "" , false , nil )
792
792
@@ -808,7 +808,7 @@ func TestChaincodeInvokeChaincodeErrorCase(t *testing.T) {
808
808
f = "init"
809
809
args = util .ToChaincodeArgs (f )
810
810
811
- spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
811
+ spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
812
812
813
813
cccid2 := NewCCContext (chainID , "pthru" , "0" , "" , false , nil )
814
814
@@ -828,7 +828,7 @@ func TestChaincodeInvokeChaincodeErrorCase(t *testing.T) {
828
828
f = chaincodeID1
829
829
args = util .ToChaincodeArgs (f , "invoke" , "a" )
830
830
831
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
831
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
832
832
// Invoke chaincode
833
833
_ , _ , _ , err = invoke (ctxt , chainID , spec2 )
834
834
@@ -875,7 +875,7 @@ func TestRangeQuery(t *testing.T) {
875
875
f := "init"
876
876
args := util .ToChaincodeArgs (f )
877
877
878
- spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : args }}
878
+ spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : args }}
879
879
880
880
cccid := NewCCContext (chainID , "tmap" , "0" , "" , false , nil )
881
881
@@ -892,7 +892,7 @@ func TestRangeQuery(t *testing.T) {
892
892
f = "keys"
893
893
args = util .ToChaincodeArgs (f )
894
894
895
- spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : args }}
895
+ spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : args }}
896
896
_ , _ , _ , err = invoke (ctxt , chainID , spec )
897
897
898
898
if err != nil {
@@ -921,7 +921,7 @@ func TestGetEvent(t *testing.T) {
921
921
922
922
cID := & pb.ChaincodeID {Name : "esender" , Path : url }
923
923
f := "init"
924
- spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : util .ToChaincodeArgs (f )}}
924
+ spec := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : util .ToChaincodeArgs (f )}}
925
925
926
926
cccid := NewCCContext (chainID , "esender" , "0" , "" , false , nil )
927
927
@@ -938,7 +938,7 @@ func TestGetEvent(t *testing.T) {
938
938
939
939
args := util .ToChaincodeArgs ("invoke" , "i" , "am" , "satoshi" )
940
940
941
- spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , CtorMsg : & pb.ChaincodeInput {Args : args }}
941
+ spec = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID , Input : & pb.ChaincodeInput {Args : args }}
942
942
943
943
var ccevt * pb.ChaincodeEvent
944
944
ccevt , _ , _ , err = invoke (ctxt , chainID , spec )
@@ -990,7 +990,7 @@ func TestChaincodeQueryChaincodeUsingInvoke(t *testing.T) {
990
990
f := "init"
991
991
args := util .ToChaincodeArgs (f , "a" , "100" , "b" , "200" )
992
992
993
- spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , CtorMsg : & pb.ChaincodeInput {Args : args }}
993
+ spec1 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID1 , Input : & pb.ChaincodeInput {Args : args }}
994
994
995
995
cccid1 := NewCCContext (chainID , "example02" , "0" , "" , false , nil )
996
996
@@ -1012,7 +1012,7 @@ func TestChaincodeQueryChaincodeUsingInvoke(t *testing.T) {
1012
1012
f = "init"
1013
1013
args = util .ToChaincodeArgs (f , "sum" , "0" )
1014
1014
1015
- spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
1015
+ spec2 := & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
1016
1016
1017
1017
cccid2 := NewCCContext (chainID , "example05" , "0" , "" , false , nil )
1018
1018
@@ -1032,7 +1032,7 @@ func TestChaincodeQueryChaincodeUsingInvoke(t *testing.T) {
1032
1032
f = "invoke"
1033
1033
args = util .ToChaincodeArgs (f , chaincodeID1 , "sum" )
1034
1034
1035
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
1035
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
1036
1036
// Invoke chaincode
1037
1037
var retVal []byte
1038
1038
_ , _ , retVal , err = invoke (ctxt , chainID , spec2 )
@@ -1059,7 +1059,7 @@ func TestChaincodeQueryChaincodeUsingInvoke(t *testing.T) {
1059
1059
f = "query"
1060
1060
args = util .ToChaincodeArgs (f , chaincodeID1 , "sum" )
1061
1061
1062
- spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , CtorMsg : & pb.ChaincodeInput {Args : args }}
1062
+ spec2 = & pb.ChaincodeSpec {Type : 1 , ChaincodeID : cID2 , Input : & pb.ChaincodeInput {Args : args }}
1063
1063
// Invoke chaincode
1064
1064
_ , _ , retVal , err = invoke (ctxt , chainID , spec2 )
1065
1065
0 commit comments