Skip to content

Commit

Permalink
FAB-10974 Remove cc-spec from core/controller
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jason Yellick committed Jul 10, 2018
1 parent 5d34c6a commit 881fc85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion core/chaincode/container_runtime.go
Expand Up @@ -61,7 +61,11 @@ func (c *ContainerRuntime) Start(ctxt context.Context, cccid *ccprovider.CCConte

scr := container.StartContainerReq{
Builder: &container.PlatformBuilder{
DeploymentSpec: cds,
Type: cds.CCType(),
Name: cds.Name(),
Version: cds.Version(),
Path: cds.Path(),
CodePackage: cds.Bytes(),
PlatformRegistry: c.PlatformRegistry,
},
Args: lc.Args,
Expand Down
16 changes: 10 additions & 6 deletions core/container/controller.go
Expand Up @@ -127,18 +127,22 @@ type StartContainerReq struct {
// the dockercontroller package with the CDS, which is also
// undesirable.
type PlatformBuilder struct {
DeploymentSpec *pb.ChaincodeDeploymentSpec
Type string
Path string
Name string
Version string
CodePackage []byte
PlatformRegistry *platforms.Registry
}

// Build a tar stream based on the CDS
func (b *PlatformBuilder) Build() (io.Reader, error) {
return b.PlatformRegistry.GenerateDockerBuild(
b.DeploymentSpec.CCType(),
b.DeploymentSpec.Path(),
b.DeploymentSpec.Name(),
b.DeploymentSpec.Version(),
b.DeploymentSpec.Bytes(),
b.Type,
b.Path,
b.Name,
b.Version,
b.CodePackage,
)
}

Expand Down

0 comments on commit 881fc85

Please sign in to comment.