Skip to content

Commit

Permalink
Merge pull request #2481 from OffchainLabs/fix-hot-reload-config-over…
Browse files Browse the repository at this point in the history
…rides

Move TxLookupLimit override into ParseNode
  • Loading branch information
Tristan-Wilson authored Jul 13, 2024
2 parents 9e5f946 + 5a9d31f commit 4e0c149
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 4e0c149

Please sign in to comment.