forked from TrueCloudLab/neoneo-go
Merge pull request #3257 from nspcc-dev/check-init
rpcclient: check network initialisation for blocks subscriptions
This commit is contained in:
commit
afca64f164
1 changed files with 3 additions and 0 deletions
|
@ -732,6 +732,9 @@ func (c *WSClient) ReceiveBlocks(flt *neorpc.BlockFilter, rcvr chan<- *block.Blo
|
||||||
if rcvr == nil {
|
if rcvr == nil {
|
||||||
return "", ErrNilNotificationReceiver
|
return "", ErrNilNotificationReceiver
|
||||||
}
|
}
|
||||||
|
if !c.cache.initDone {
|
||||||
|
return "", errNetworkNotInitialized
|
||||||
|
}
|
||||||
params := []any{"block_added"}
|
params := []any{"block_added"}
|
||||||
if flt != nil {
|
if flt != nil {
|
||||||
flt = flt.Copy()
|
flt = flt.Copy()
|
||||||
|
|
Loading…
Reference in a new issue