Skip to content

Commit

Permalink
fix tier1 panic when there aren't wasmextensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Mar 27, 2024
1 parent 18eca49 commit 3ab9f9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func NewTier1(logger *zap.Logger, config *Tier1Config, modules *Tier1Modules) *T
}

func (a *Tier1App) Run() error {

dmetrics.Register(metrics.MetricSet)

a.logger.Info("running substreams-tier1", zap.Reflect("config", a.config))
Expand Down Expand Up @@ -157,14 +158,19 @@ func (a *Tier1App) Run() error {
opts = append(opts, service.WithModuleExecutionTracing())
}

var wasmModules map[string]string
if a.config.WASMExtensions != nil {
wasmModules = a.config.WASMExtensions.Params()
}

tier2RequestParameters := reqctx.Tier2RequestParameters{
NetworkName: a.config.NetworkName,
FirstStreamableBlock: bstream.GetProtocolFirstStreamableBlock,
MergedBlockStoreURL: a.config.MergedBlocksStoreURL,
StateStoreURL: a.config.StateStoreURL,
StateBundleSize: a.config.StateBundleSize,
StateStoreDefaultTag: a.config.StateStoreDefaultTag,
WASMModules: a.config.WASMExtensions.Params(),
WASMModules: wasmModules,
}

svc, err := service.NewTier1(
Expand Down

0 comments on commit 3ab9f9e

Please sign in to comment.