diff --git a/build/params.go b/build/params.go index 6743b7b01..633614756 100644 --- a/build/params.go +++ b/build/params.go @@ -85,3 +85,6 @@ func init() { panic("could not parse InitialRewardStr") } } + +// Sync +const BadBlockCacheSize = 8192 diff --git a/chain/badtscache.go b/chain/badtscache.go index 1e2b67f39..ee63c1abd 100644 --- a/chain/badtscache.go +++ b/chain/badtscache.go @@ -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) }