Skip to content

Commit

Permalink
tbcd: add BlockCache and BlockheaderCache to default config
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuasing committed Aug 12, 2024
1 parent 47d50c8 commit 4e80390
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/tbcd/tbcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
},
"TBC_BLOCK_CACHE": config.Config{
Value: &cfg.BlockCache,
DefaultValue: int(250),
DefaultValue: 250,
Help: "number of cached blocks",
Print: config.PrintAll,
},
Expand Down Expand Up @@ -77,7 +77,7 @@ var (
},
"TBC_MAX_CACHED_TXS": config.Config{
Value: &cfg.MaxCachedTxs,
DefaultValue: 1000000,
DefaultValue: int(1e6),
Help: "maximum cached utxos and/or txs during indexing",
Print: config.PrintAll,
},
Expand Down
10 changes: 6 additions & 4 deletions service/tbc/tbc.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ type Config struct {

func NewDefaultConfig() *Config {
return &Config{
ListenAddress: tbcapi.DefaultListen,
LogLevel: logLevel,
MaxCachedTxs: defaultMaxCachedTxs,
PeersWanted: defaultPeersWanted,
ListenAddress: tbcapi.DefaultListen,
BlockCache: 250,
BlockheaderCache: 1e6,
LogLevel: logLevel,
MaxCachedTxs: defaultMaxCachedTxs,
PeersWanted: defaultPeersWanted,
}
}

Expand Down

0 comments on commit 4e80390

Please sign in to comment.