Skip to content

Commit

Permalink
Node/P2P: Add WithComponents (#4089)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley authored Aug 20, 2024
1 parent c5241ad commit 088c18b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions node/pkg/p2p/run_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ func NewRunParams(
return p, nil
}

// WithComponents is used to set the components if you need something other than the defaults.
func WithComponents(components *Components) RunOpt {
return func(p *RunParams) error {
p.components = components
return nil
}
}

// WithSignedObservationListener is used to set the channel to receive `SignedObservation` messages.
func WithSignedObservationListener(obsvRecvC chan<- *common.MsgWithTimeStamp[gossipv1.SignedObservation]) RunOpt {
return func(p *RunParams) error {
Expand Down

0 comments on commit 088c18b

Please sign in to comment.