Skip to content

Commit 07e907c

Browse files
authored
cmd/utils: fix txlookuplimit for archive node (#22419)
* cmd/utils: fix exclusive check for archive node * cmd/utils: set the txlookuplimit to 0
1 parent c539a05 commit 07e907c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/utils/flags.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,8 +1477,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
14771477
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, YoloV3Flag)
14781478
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light")
14791479
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
1480-
CheckExclusive(ctx, GCModeFlag, "archive", TxLookupLimitFlag)
1481-
if ctx.GlobalIsSet(LightServeFlag.Name) && ctx.GlobalIsSet(TxLookupLimitFlag.Name) {
1480+
if ctx.GlobalString(GCModeFlag.Name) == "archive" && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 {
1481+
ctx.GlobalSet(TxLookupLimitFlag.Name, "0")
1482+
log.Warn("Disable transaction unindexing for archive node")
1483+
}
1484+
if ctx.GlobalIsSet(LightServeFlag.Name) && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 {
14821485
log.Warn("LES server cannot serve old transaction status and cannot connect below les/4 protocol version if transaction lookup index is limited")
14831486
}
14841487
var ks *keystore.KeyStore

0 commit comments

Comments
 (0)