Skip to content

Commit

Permalink
fix panic on substreams-tier1
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Mar 27, 2024
1 parent 2230435 commit bc70f98
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/apps/substreams_tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/streamingfast/firehose-core/launcher"
"github.com/streamingfast/logging"
app "github.com/streamingfast/substreams/app"
"github.com/streamingfast/substreams/wasm"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -97,9 +98,13 @@ func RegisterSubstreamsTier1App[B firecore.Block](chain *firecore.Chain[B], root
}
}

wasmExtensions, err := chain.RegisterSubstreamsExtensions()
if err != nil {
return nil, fmt.Errorf("substreams extensions: %w", err)
var wasmExtensions wasm.WASMExtensioner
if chain.RegisterSubstreamsExtensions != nil {
exts, err := chain.RegisterSubstreamsExtensions()
if err != nil {
return nil, fmt.Errorf("substreams extensions: %w", err)
}
wasmExtensions = exts
}

meteringConfig := viper.GetString("common-metering-plugin")
Expand Down

0 comments on commit bc70f98

Please sign in to comment.