Skip to content

Commit

Permalink
Update initialization of rest access server
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Oct 11, 2023
1 parent d5112e9 commit dbef27c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion server/access/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"github.com/onflow/flow-go/engine/access/rest"
"github.com/onflow/flow-go/engine/access/rest/routes"
"github.com/onflow/flow-go/engine/access/state_stream"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/module"
"github.com/onflow/flow-go/module/metrics"
Expand Down Expand Up @@ -94,7 +95,18 @@ func NewRestServer(logger *zerolog.Logger, adapter *adapters.AccessAdapter, chai
}
}

srv, err := rest.NewServer(adapter, fmt.Sprintf("%s:3333", host), debugLogger, chain, restCollector)
srv, err := rest.NewServer(
adapter,
rest.Config{
ListenAddress: fmt.Sprintf("%s:3333", host),
},
debugLogger,
chain,
restCollector,
&state_stream.StateStreamBackend{},
state_stream.DefaultEventFilterConfig,
state_stream.DefaultMaxGlobalStreams,
)

if err != nil {
return nil, err
Expand Down

0 comments on commit dbef27c

Please sign in to comment.