Skip to content

Commit

Permalink
checked if announcer is empty (on mobile)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Nov 6, 2023
1 parent 6d81b64 commit a7b3699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions blockchain/bl_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ func (bl *FxBlockchain) PoolJoin(ctx context.Context, to peer.ID, r PoolJoinRequ
if err != nil {
return b, err
}
bl.wg.Add(1)
go bl.a.AnnounceJoinPoolRequestPeriodically(ctx)
if bl.a != nil {
bl.wg.Add(1)
go bl.a.AnnounceJoinPoolRequestPeriodically(ctx)
}
return b, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion mobile/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (cfg *Config) init(mc *Client) error {
if err != nil {
return err
}
mc.bl, err = blockchain.NewFxBlockchain(mc.h, nil,
mc.bl, err = blockchain.NewFxBlockchain(mc.h, nil, nil,
blockchain.NewSimpleKeyStorer(""),
blockchain.WithAuthorizer(mc.h.ID()),
blockchain.WithAllowTransientConnection(cfg.AllowTransientConnection),
Expand Down

0 comments on commit a7b3699

Please sign in to comment.