@@ -282,6 +282,12 @@ var (
282
282
Value : ethconfig .Defaults .StateHistory ,
283
283
Category : flags .StateCategory ,
284
284
}
285
+ TrienodeHistoryFlag = & cli.Int64Flag {
286
+ Name : "history.trienode" ,
287
+ Usage : "Number of recent blocks to retain trienode history for, only relevant in state.scheme=path (default/negative = disabled, 0 = entire chain)" ,
288
+ Value : ethconfig .Defaults .TrienodeHistory ,
289
+ Category : flags .StateCategory ,
290
+ }
285
291
TransactionHistoryFlag = & cli.Uint64Flag {
286
292
Name : "history.transactions" ,
287
293
Usage : "Number of recent blocks to maintain transactions index for (default = about one year, 0 = entire chain)" ,
@@ -1647,6 +1653,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
1647
1653
if ctx .IsSet (StateHistoryFlag .Name ) {
1648
1654
cfg .StateHistory = ctx .Uint64 (StateHistoryFlag .Name )
1649
1655
}
1656
+ if ctx .IsSet (TrienodeHistoryFlag .Name ) {
1657
+ cfg .TrienodeHistory = ctx .Int64 (TrienodeHistoryFlag .Name )
1658
+ }
1650
1659
if ctx .IsSet (StateSchemeFlag .Name ) {
1651
1660
cfg .StateScheme = ctx .String (StateSchemeFlag .Name )
1652
1661
}
@@ -2200,15 +2209,16 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
2200
2209
Fatalf ("%v" , err )
2201
2210
}
2202
2211
options := & core.BlockChainConfig {
2203
- TrieCleanLimit : ethconfig .Defaults .TrieCleanCache ,
2204
- NoPrefetch : ctx .Bool (CacheNoPrefetchFlag .Name ),
2205
- TrieDirtyLimit : ethconfig .Defaults .TrieDirtyCache ,
2206
- ArchiveMode : ctx .String (GCModeFlag .Name ) == "archive" ,
2207
- TrieTimeLimit : ethconfig .Defaults .TrieTimeout ,
2208
- SnapshotLimit : ethconfig .Defaults .SnapshotCache ,
2209
- Preimages : ctx .Bool (CachePreimagesFlag .Name ),
2210
- StateScheme : scheme ,
2211
- StateHistory : ctx .Uint64 (StateHistoryFlag .Name ),
2212
+ TrieCleanLimit : ethconfig .Defaults .TrieCleanCache ,
2213
+ NoPrefetch : ctx .Bool (CacheNoPrefetchFlag .Name ),
2214
+ TrieDirtyLimit : ethconfig .Defaults .TrieDirtyCache ,
2215
+ ArchiveMode : ctx .String (GCModeFlag .Name ) == "archive" ,
2216
+ TrieTimeLimit : ethconfig .Defaults .TrieTimeout ,
2217
+ SnapshotLimit : ethconfig .Defaults .SnapshotCache ,
2218
+ Preimages : ctx .Bool (CachePreimagesFlag .Name ),
2219
+ StateScheme : scheme ,
2220
+ StateHistory : ctx .Uint64 (StateHistoryFlag .Name ),
2221
+ TrienodeHistory : ctx .Int64 (TrienodeHistoryFlag .Name ),
2212
2222
// Disable transaction indexing/unindexing.
2213
2223
TxLookupLimit : - 1 ,
2214
2224
0 commit comments