@@ -10,7 +10,6 @@ import (
1010 "github.com/hyperledger-labs/fabric-smart-client/pkg/utils/errors"
1111 committer2 "github.com/hyperledger-labs/fabric-smart-client/platform/common/core/generic/committer"
1212 driver2 "github.com/hyperledger-labs/fabric-smart-client/platform/common/driver"
13- "github.com/hyperledger-labs/fabric-smart-client/platform/common/utils"
1413 digutils "github.com/hyperledger-labs/fabric-smart-client/platform/common/utils/dig"
1514 "github.com/hyperledger-labs/fabric-smart-client/platform/fabric/core"
1615 "github.com/hyperledger-labs/fabric-smart-client/platform/fabric/core/generic"
@@ -28,7 +27,6 @@ import (
2827 vdriver "github.com/hyperledger-labs/fabric-smart-client/platform/view/driver"
2928 sdk "github.com/hyperledger-labs/fabric-smart-client/platform/view/sdk/dig"
3029 dbdriver "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/db/driver"
31- mem "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/db/driver/memory"
3230 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/events"
3331 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/hash"
3432 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/kvs"
@@ -187,8 +185,8 @@ func NewEndorseTxStore(in struct {
187185 Config vdriver.ConfigService
188186 Drivers []dbdriver.NamedDriver `group:"db-drivers"`
189187}) (driver.EndorseTxStore , error ) {
190- driverName := driver2 .PersistenceType (utils . DefaultString ( in .Config .GetString ("fsc.endorsetx.persistence.type" ), string ( mem . MemoryPersistence ) ))
191- if sdk .UnsupportedStores .Contains (driverName ) {
188+ driverName := driver2 .PersistenceType (in .Config .GetString ("fsc.endorsetx.persistence.type" ))
189+ if ! sdk .SupportedStores .Contains (driverName ) {
192190 return services .NewKVSBasedEndorseTxStore (in .KVS ), nil
193191 }
194192 for _ , d := range in .Drivers {
@@ -205,8 +203,8 @@ func NewMetadataStore(in struct {
205203 Config vdriver.ConfigService
206204 Drivers []dbdriver.NamedDriver `group:"db-drivers"`
207205}) (driver.MetadataStore , error ) {
208- driverName := driver2 .PersistenceType (utils . DefaultString ( in .Config .GetString ("fsc.metadata.persistence.type" ), string ( mem . MemoryPersistence ) ))
209- if sdk .UnsupportedStores .Contains (driverName ) {
206+ driverName := driver2 .PersistenceType (in .Config .GetString ("fsc.metadata.persistence.type" ))
207+ if ! sdk .SupportedStores .Contains (driverName ) {
210208 return services .NewKVSBasedMetadataStore (in .KVS ), nil
211209 }
212210 for _ , d := range in .Drivers {
@@ -223,8 +221,8 @@ func NewEnvelopeStore(in struct {
223221 Config vdriver.ConfigService
224222 Drivers []dbdriver.NamedDriver `group:"db-drivers"`
225223}) (driver.EnvelopeStore , error ) {
226- driverName := driver2 .PersistenceType (utils . DefaultString ( in .Config .GetString ("fsc.envelope.persistence.type" ), string ( mem . MemoryPersistence ) ))
227- if sdk .UnsupportedStores .Contains (driverName ) {
224+ driverName := driver2 .PersistenceType (in .Config .GetString ("fsc.envelope.persistence.type" ))
225+ if ! sdk .SupportedStores .Contains (driverName ) {
228226 return services .NewKVSBasedEnvelopeStore (in .KVS ), nil
229227 }
230228 for _ , d := range in .Drivers {
0 commit comments