Skip to content

Commit

Permalink
Merge pull request #3257 from nspcc-dev/check-init
Browse files Browse the repository at this point in the history
rpcclient: check network initialisation for blocks subscriptions
  • Loading branch information
roman-khimov authored Dec 8, 2023
2 parents 441eb8a + 21ccb1a commit afca64f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/rpcclient/wsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,9 @@ func (c *WSClient) ReceiveBlocks(flt *neorpc.BlockFilter, rcvr chan<- *block.Blo
if rcvr == nil {
return "", ErrNilNotificationReceiver
}
if !c.cache.initDone {
return "", errNetworkNotInitialized
}
params := []any{"block_added"}
if flt != nil {
flt = flt.Copy()
Expand Down

0 comments on commit afca64f

Please sign in to comment.