Skip to content

Commit

Permalink
Merge "Remove persistence.PackageProvider"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Yellick authored and Gerrit Code Review committed Nov 15, 2019
2 parents 019c7ab + 86f53bc commit 0411196
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 288 deletions.
182 changes: 0 additions & 182 deletions core/chaincode/persistence/mock/legacy_package_provider.go

This file was deleted.

38 changes: 0 additions & 38 deletions core/chaincode/persistence/package_provider.go

This file was deleted.

59 changes: 0 additions & 59 deletions core/chaincode/persistence/package_provider_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions core/chaincode/persistence/persistence_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ type osFileInfo interface {
os.FileInfo
}

//go:generate counterfeiter -o mock/legacy_package_provider.go -fake-name LegacyPackageProvider . legacyPackageProvider
type legacyPackageProvider interface {
persistence.LegacyPackageProvider
}

//go:generate mockery -dir . -name MetadataProvider -case underscore -output mock/ -outpkg mock

func TestPersistence(t *testing.T) {
Expand Down
7 changes: 3 additions & 4 deletions internal/peer/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -358,16 +359,14 @@ func serve(args []string) error {
LegacyDeployedCCInfoProvider: &lscc.DeployedCCInfoProvider{},
}

packageProvider := &persistence.PackageProvider{
LegacyPP: &ccprovider.CCInfoFSImpl{GetHasher: factory.GetDefault()},
}
ccInfoFSImpl := &ccprovider.CCInfoFSImpl{GetHasher: factory.GetDefault()}

// legacyMetadataManager collects metadata information from the legacy
// lifecycle (lscc). This is expected to disappear with FAB-15061.
legacyMetadataManager, err := cclifecycle.NewMetadataManager(
cclifecycle.EnumerateFunc(
func() ([]ccdef.InstalledChaincode, error) {
return packageProvider.ListInstalledChaincodesLegacy()
return ccInfoFSImpl.ListInstalledChaincodes(ccInfoFSImpl.GetChaincodeInstallPath(), ioutil.ReadDir, ccprovider.LoadPackage)
},
),
)
Expand Down

0 comments on commit 0411196

Please sign in to comment.