File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -84,11 +84,6 @@ func GetCouchdbRedologsPath() string {
84
84
return filepath .Join (GetRootPath (), couchdbRedoLogPath )
85
85
}
86
86
87
- // GetMaxBlockfileSize returns maximum size of the block file
88
- func GetMaxBlockfileSize () int {
89
- return 64 * 1024 * 1024
90
- }
91
-
92
87
// GetTotalQueryLimit exposes the totalLimit variable
93
88
func GetTotalQueryLimit () int {
94
89
totalQueryLimit := viper .GetInt (confTotalQueryLimit )
Original file line number Diff line number Diff line change @@ -156,10 +156,6 @@ func TestIsHistoryDBEnabledFalse(t *testing.T) {
156
156
assert .False (t , updatedValue ) //test config returns false
157
157
}
158
158
159
- func TestGetMaxBlockfileSize (t * testing.T ) {
160
- assert .Equal (t , 67108864 , GetMaxBlockfileSize ())
161
- }
162
-
163
159
func setUpCoreYAMLConfig () {
164
160
//call a helper method to load the core.yaml
165
161
ledgertestutil .SetupCoreYAMLConfig ()
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import (
21
21
"github.com/pkg/errors"
22
22
)
23
23
24
+ const maxBlockFileSize = 64 * 1024 * 1024
25
+
24
26
var logger = flogging .MustGetLogger ("ledgerstorage" )
25
27
26
28
// Provider encapusaltes two providers 1) block store provider and 2) and pvt data store provider
@@ -49,7 +51,7 @@ func NewProvider() *Provider {
49
51
}
50
52
indexConfig := & blkstorage.IndexConfig {AttrsToIndex : attrsToIndex }
51
53
blockStoreProvider := fsblkstorage .NewProvider (
52
- fsblkstorage .NewConf (ledgerconfig .GetBlockStorePath (), ledgerconfig . GetMaxBlockfileSize () ),
54
+ fsblkstorage .NewConf (ledgerconfig .GetBlockStorePath (), maxBlockFileSize ),
53
55
indexConfig )
54
56
55
57
pvtStoreProvider := pvtdatastorage .NewProvider ()
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ func TestStoreWithExistingBlockchain(t *testing.T) {
123
123
}
124
124
indexConfig := & blkstorage.IndexConfig {AttrsToIndex : attrsToIndex }
125
125
blockStoreProvider := fsblkstorage .NewProvider (
126
- fsblkstorage .NewConf (ledgerconfig .GetBlockStorePath (), ledgerconfig . GetMaxBlockfileSize () ),
126
+ fsblkstorage .NewConf (ledgerconfig .GetBlockStorePath (), maxBlockFileSize ),
127
127
indexConfig )
128
128
129
129
blkStore , err := blockStoreProvider .OpenBlockStore (testLedgerid )
You can’t perform that action at this time.
0 commit comments