-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] move config.Indexer to blockindex package (#3573)
- Loading branch information
Showing
4 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2022 IoTeX Foundation | ||
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no | ||
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent | ||
// permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache | ||
// License 2.0 that can be found in the LICENSE file. | ||
|
||
package blockindex | ||
|
||
// Config is the config for indexer | ||
type Config struct { | ||
// RangeBloomFilterNumElements is the number of elements each rangeBloomfilter will store in bloomfilterIndexer | ||
RangeBloomFilterNumElements uint64 `yaml:"rangeBloomFilterNumElements"` | ||
// RangeBloomFilterSize is the size (in bits) of rangeBloomfilter | ||
RangeBloomFilterSize uint64 `yaml:"rangeBloomFilterSize"` | ||
// RangeBloomFilterNumHash is the number of hash functions of rangeBloomfilter | ||
RangeBloomFilterNumHash uint64 `yaml:"rangeBloomFilterNumHash"` | ||
} | ||
|
||
// DefaultConfig is the default config of indexer | ||
var DefaultConfig = Config{ | ||
RangeBloomFilterNumElements: 100000, | ||
RangeBloomFilterSize: 1200000, | ||
RangeBloomFilterNumHash: 8, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters