Skip to content

Commit 26a1d9c

Browse files
author
Jason Yellick
committed
FAB-11491 Inline getCodePackage
This function is only called in one place, and simply wraps and returns an error, eliminating. Change-Id: I43721bb6e742022e808f94d4d4c1fdcdf8fbf015 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent 00fd1c1 commit 26a1d9c

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

core/chaincode/runtime_launcher.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ func (r *RuntimeLauncher) Launch(ccci *ccprovider.ChaincodeContainerInfo) error
4646
startFailCh = make(chan error, 1)
4747
timeoutCh = time.NewTimer(r.StartupTimeout).C
4848

49-
codePackage, err := r.getCodePackage(ccci)
49+
codePackage, err := r.PackageProvider.GetChaincodeCodePackage(ccci)
5050
if err != nil {
51-
return err
51+
return errors.Wrap(err, "failed to get chaincode package")
5252
}
5353

5454
go func() {
@@ -95,12 +95,3 @@ func (r *RuntimeLauncher) Launch(ccci *ccprovider.ChaincodeContainerInfo) error
9595
chaincodeLogger.Debug("launch complete")
9696
return err
9797
}
98-
99-
func (r *RuntimeLauncher) getCodePackage(ccci *ccprovider.ChaincodeContainerInfo) ([]byte, error) {
100-
codePackage, err := r.PackageProvider.GetChaincodeCodePackage(ccci)
101-
if err != nil {
102-
return nil, errors.Wrap(err, "failed to get chaincode package")
103-
}
104-
105-
return codePackage, nil
106-
}

0 commit comments

Comments
 (0)