Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move TxLookupLimit override into ParseNode #2481

Merged
merged 4 commits into from
Jul 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,6 @@ func mainImpl() int {
return 0
}

if nodeConfig.Execution.Caching.Archive && nodeConfig.Execution.TxLookupLimit != 0 {
log.Info("retaining ability to lookup full transaction history as archive mode is enabled")
nodeConfig.Execution.TxLookupLimit = 0
}

if err := resourcemanager.Init(&nodeConfig.Node.ResourceMgmt); err != nil {
flag.Usage()
log.Crit("Failed to start resource management module", "err", err)
Expand Down Expand Up @@ -912,6 +907,12 @@ func ParseNode(ctx context.Context, args []string) (*NodeConfig, *genericconf.Wa
if nodeConfig.Execution.Caching.Archive {
nodeConfig.Node.MessagePruner.Enable = false
}

if nodeConfig.Execution.Caching.Archive && nodeConfig.Execution.TxLookupLimit != 0 {
log.Info("retaining ability to lookup full transaction history as archive mode is enabled")
nodeConfig.Execution.TxLookupLimit = 0
}

err = nodeConfig.Validate()
if err != nil {
return nil, nil, err
Expand Down
Loading