Skip to content

Commit e0deabc

Browse files
committed
Use default blobreactor config if missing
1 parent ce2efdb commit e0deabc

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

node-core/components/blob_reactor.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@ type BlobReactorInput struct {
4141

4242
// ProvideBlobReactor provides the blob reactor for P2P communication.
4343
func ProvideBlobReactor(in BlobReactorInput) *blobreactor.BlobReactor {
44+
cfg := in.Config.BlobReactor
45+
46+
// Guard against missing config fields - apply defaults for zero values
47+
if cfg.RequestTimeout == 0 {
48+
cfg.RequestTimeout = blobreactor.DefaultConfig().RequestTimeout
49+
}
50+
4451
return blobreactor.NewBlobReactor(
4552
in.StorageBackend.AvailabilityStore().IndexDB,
4653
in.Logger.With("service", "blob-reactor"),
47-
in.Config.BlobReactor,
54+
cfg,
4855
in.TelemetrySink,
4956
)
5057
}

0 commit comments

Comments
 (0)