neoneo-go/pkg/rpcclient
Anna Shaleva 1a6f1c805c rpc: fix race in TestWSClientEvents
```
2022-10-21T08:59:45.2219797Z === RUN   TestWSClientEvents/default_ntf_channel
2022-10-21T08:59:45.2219901Z ==================
2022-10-21T08:59:45.2220017Z WARNING: DATA RACE
2022-10-21T08:59:45.2220177Z Write at 0x00c000c82778 by goroutine 371:
2022-10-21T08:59:45.2220580Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents.func2()
2022-10-21T08:59:45.2221112Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:171 +0x1c4
2022-10-21T08:59:45.2221244Z   testing.tRunner()
2022-10-21T08:59:45.2221617Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2221759Z   testing.(*T).Run.func1()
2022-10-21T08:59:45.2222124Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2222138Z
2022-10-21T08:59:45.2222308Z Previous read at 0x00c000c82778 by goroutine 37:
2022-10-21T08:59:45.2222694Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.(*Client).StateRootInHeader()
2022-10-21T08:59:45.2223151Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/rpc.go:1104 +0xb0
2022-10-21T08:59:45.2223482Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).wsReader()
2022-10-21T08:59:45.2224077Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:210 +0x651
2022-10-21T08:59:45.2224416Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS.func2()
2022-10-21T08:59:45.2224892Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:149 +0x39
2022-10-21T08:59:45.2224901Z
2022-10-21T08:59:45.2225049Z Goroutine 371 (running) created at:
2022-10-21T08:59:45.2225182Z   testing.(*T).Run()
2022-10-21T08:59:45.2225548Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x724
2022-10-21T08:59:45.2225911Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents()
2022-10-21T08:59:45.2226408Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:167 +0x404
2022-10-21T08:59:45.2226539Z   testing.tRunner()
2022-10-21T08:59:45.2226900Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2227042Z   testing.(*T).Run.func1()
2022-10-21T08:59:45.2227398Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2227406Z
2022-10-21T08:59:45.2227552Z Goroutine 37 (finished) created at:
2022-10-21T08:59:45.2227851Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS()
2022-10-21T08:59:45.2228327Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:149 +0x6fb
2022-10-21T08:59:45.2228843Z   github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents.func2()
2022-10-21T08:59:45.2229434Z       /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:168 +0x131
2022-10-21T08:59:45.2229569Z   testing.tRunner()
2022-10-21T08:59:45.2229930Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2230069Z   testing.(*T).Run.func1()
2022-10-21T08:59:45.2230424Z       /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2230526Z ==================
2022-10-21T08:59:45.2230703Z     wsclient_test.go:186:
2022-10-21T08:59:45.2230988Z         	Error Trace:	wsclient_test.go:186
2022-10-21T08:59:45.2231209Z         	Error:      	Should be true
2022-10-21T08:59:45.2231536Z         	Test:       	TestWSClientEvents/default_ntf_channel
2022-10-21T08:59:45.2231812Z     testing.go:1312: race detected during execution of test
```
2022-10-24 06:09:36 +03:00
..
actor rpc: extend Waiter interface to wait for several txs with context 2022-10-24 06:09:36 +03:00
gas rpcclient: add examples for nep11/nep17/neo 2022-09-08 14:33:04 +03:00
invoker rpc: add compat tests for RPC* interfaces and Client implementations 2022-10-24 06:09:36 +03:00
management rpcclient: add management wrapper for ContractManagement 2022-08-17 11:42:20 +03:00
neo rpcclient: add examples for nep11/nep17/neo 2022-09-08 14:33:04 +03:00
nep11 rpcclient: add examples for nep11/nep17/neo 2022-09-08 14:33:04 +03:00
nep17 rpcclient: add examples for nep11/nep17/neo 2022-09-08 14:33:04 +03:00
neptoken neptoken: add Info to replace old NEPXXTokenInfo methods 2022-08-29 22:52:27 +03:00
nns nns: it's NEP-11, so make NEP-11 methods available too 2022-09-08 14:33:04 +03:00
notary rpc: implement transaction awaiting functionality 2022-10-24 06:09:36 +03:00
oracle rpcclient: add oracle package for OracleContract 2022-08-17 11:42:20 +03:00
policy rpcclient: add policy package for the PolicyContract contract 2022-08-16 12:43:25 +03:00
rolemgmt unwrap: add ArrayOfPublicKeys() 2022-08-17 12:45:46 +03:00
unwrap unwrap: provide ErrNoSessionID, add some explanations 2022-09-07 22:40:25 +03:00
client.go rpc: implement transaction awaiting functionality 2022-10-24 06:09:36 +03:00
doc.go rpcclient: update documentation, mention subpackages 2022-09-08 14:33:04 +03:00
doc_test.go rpc/client: move to pkg/rpcclient 2022-07-21 22:39:53 +03:00
helper.go rpcclient: move result processing code into unwrap package 2022-08-09 17:38:47 +03:00
native.go Merge pull request #2665 from nspcc-dev/notary-rpcclient 2022-08-30 12:43:13 +03:00
nep.go rpcclient: move result processing code into unwrap package 2022-08-09 17:38:47 +03:00
nep11.go wallet: add ScriptHash() to Account 2022-09-02 14:43:34 +03:00
nep17.go wallet: add ScriptHash() to Account 2022-09-02 14:43:34 +03:00
policy.go rpcclient; deprecate more methods 2022-09-08 14:33:04 +03:00
rpc.go *: use uint*Size and SignatureLen constants where appropriate 2022-10-05 10:45:52 +03:00
rpc_test.go rpc: merge response and request under pkg/neorpc 2022-07-25 11:57:53 +03:00
wsclient.go rpc: mark old WSClient's SubscribeFor* methods as deprecated 2022-10-24 06:09:36 +03:00
wsclient_test.go rpc: fix race in TestWSClientEvents 2022-10-24 06:09:36 +03:00