Skip to content

Commit 3f3ac94

Browse files
committed
Revert "cmd: no need to indexing the whole blocks in pbss archive"
This reverts commit 6af5201. Signed-off-by: Delweng <[email protected]>
1 parent 9779485 commit 3f3ac94

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

cmd/utils/flags.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,18 +1656,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
16561656
log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions")
16571657
cfg.TransactionHistory = ctx.Uint64(TxLookupLimitFlag.Name)
16581658
}
1659-
1660-
if ctx.String(GCModeFlag.Name) == "archive" && cfg.TransactionHistory != 0 && ctx.IsSet(DataDirFlag.Name) {
1661-
chaindb := tryMakeReadOnlyDatabase(ctx, stack)
1662-
scheme, err := rawdb.ParseStateScheme(cfg.StateScheme, chaindb)
1663-
if err != nil {
1664-
Fatalf("%v", err)
1665-
}
1666-
if scheme == rawdb.HashScheme {
1659+
if ctx.String(GCModeFlag.Name) == "archive" {
1660+
if cfg.TransactionHistory != 0 {
16671661
cfg.TransactionHistory = 0
1668-
log.Warn("Disabled transaction unindexing for archive node with hash state scheme")
1662+
log.Warn("Disabled transaction unindexing for archive node")
16691663
}
1670-
chaindb.Close()
16711664
}
16721665
if ctx.IsSet(LogHistoryFlag.Name) {
16731666
cfg.LogHistory = ctx.Uint64(LogHistoryFlag.Name)

0 commit comments

Comments
 (0)