Skip to content

Commit 881fc85

Browse files
author
Jason Yellick
committed
FAB-10974 Remove cc-spec from core/controller
This is part of the hygiene work to stop using external messaging protos to pass state internally. Change-Id: I13a03631de57292f7e7b52294c126635749402f6 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent 5d34c6a commit 881fc85

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

core/chaincode/container_runtime.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ func (c *ContainerRuntime) Start(ctxt context.Context, cccid *ccprovider.CCConte
6161

6262
scr := container.StartContainerReq{
6363
Builder: &container.PlatformBuilder{
64-
DeploymentSpec: cds,
64+
Type: cds.CCType(),
65+
Name: cds.Name(),
66+
Version: cds.Version(),
67+
Path: cds.Path(),
68+
CodePackage: cds.Bytes(),
6569
PlatformRegistry: c.PlatformRegistry,
6670
},
6771
Args: lc.Args,

core/container/controller.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,22 @@ type StartContainerReq struct {
127127
// the dockercontroller package with the CDS, which is also
128128
// undesirable.
129129
type PlatformBuilder struct {
130-
DeploymentSpec *pb.ChaincodeDeploymentSpec
130+
Type string
131+
Path string
132+
Name string
133+
Version string
134+
CodePackage []byte
131135
PlatformRegistry *platforms.Registry
132136
}
133137

134138
// Build a tar stream based on the CDS
135139
func (b *PlatformBuilder) Build() (io.Reader, error) {
136140
return b.PlatformRegistry.GenerateDockerBuild(
137-
b.DeploymentSpec.CCType(),
138-
b.DeploymentSpec.Path(),
139-
b.DeploymentSpec.Name(),
140-
b.DeploymentSpec.Version(),
141-
b.DeploymentSpec.Bytes(),
141+
b.Type,
142+
b.Path,
143+
b.Name,
144+
b.Version,
145+
b.CodePackage,
142146
)
143147
}
144148

0 commit comments

Comments
 (0)