Skip to content

Commit

Permalink
Merge #1696
Browse files Browse the repository at this point in the history
1696: update AN builders and scaffold to use spork id for mw r=kc1116 a=kc1116

This PR updates the usages of [p2p.NewMiddleware](https://github.com/onflow/flow-go/blob/923546c75a80e6078283d8adf6ef78dbb03b651a/network/p2p/middleware.go#L114) to use SporkID() not RootBlockID

Co-authored-by: Khalil Claybon <khalil.claybon@dapperlabs.com>
  • Loading branch information
bors[bot] and kc1116 committed Nov 30, 2021
2 parents 7c4f69a + 6a5e60c commit 0e845f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/access/node_builder/staked_access_node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (builder *StakedAccessNodeBuilder) initMiddleware(nodeID flow.Identifier,
factoryFunc,
nodeID,
networkMetrics,
builder.RootBlock.ID(),
builder.SporkID,
p2p.DefaultUnicastTimeout,
false, // no connection gating to allow unstaked nodes to connect
builder.IDTranslator,
Expand Down
2 changes: 1 addition & 1 deletion cmd/access/node_builder/unstaked_access_node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (anb *UnstakedAccessNodeBuilder) initMiddleware(nodeID flow.Identifier,
factoryFunc,
nodeID,
networkMetrics,
anb.RootBlock.ID(),
anb.SporkID,
p2p.DefaultUnicastTimeout,
false, // no connection gating for the unstaked nodes
anb.IDTranslator,
Expand Down
2 changes: 1 addition & 1 deletion cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (fnb *FlowNodeBuilder) EnqueueNetworkInit() {
libP2PNodeFactory,
fnb.Me.NodeID(),
fnb.Metrics.Network,
fnb.RootBlock.ID(),
fnb.SporkID,
fnb.BaseConfig.UnicastMessageTimeout,
true,
fnb.IDTranslator,
Expand Down

0 comments on commit 0e845f8

Please sign in to comment.