make it a const
This commit is contained in:
@@ -85,3 +85,6 @@ func init() {
|
||||
panic("could not parse InitialRewardStr")
|
||||
}
|
||||
}
|
||||
|
||||
// Sync
|
||||
const BadBlockCacheSize = 8192
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package chain
|
||||
|
||||
import (
|
||||
"github.com/filecoin-project/go-lotus/build"
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
"github.com/ipfs/go-cid"
|
||||
)
|
||||
@@ -10,7 +11,7 @@ type BadBlockCache struct {
|
||||
}
|
||||
|
||||
func NewBadBlockCache() *BadBlockCache {
|
||||
cache, err := lru.NewARC(8192)
|
||||
cache, err := lru.NewARC(build.BadBlockCacheSize)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user