Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Feb 12, 2023
1 parent 9b485f6 commit 20ff085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chainservice/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ func (builder *Builder) createBlockchain(forSubChain, forTest bool) blockchain.B

func (builder *Builder) buildNodeInfoManager() error {
cs := builder.cs
stk := staking.FindProtocol(cs.Registry())
if stk == nil {
return errors.New("cannot find staking protocol")
}
dm := nodeinfo.NewInfoManager(&builder.cfg.NodeInfo, cs.p2pAgent, cs.chain, builder.cfg.Chain.ProducerPrivateKey(), func(ctx context.Context) (state.CandidateList, error) {
stk := staking.FindProtocol(cs.Registry())
if stk == nil {
return nil, errors.New("cannot find staking protocol")
}
return stk.ActiveCandidates(ctx, cs.factory, 0)
})
builder.cs.nodeInfoManager = dm
Expand Down

0 comments on commit 20ff085

Please sign in to comment.