diff --git a/pkg/rpc/client/client.go b/pkg/rpc/client/client.go index a43f81649..1337b6d52 100644 --- a/pkg/rpc/client/client.go +++ b/pkg/rpc/client/client.go @@ -28,7 +28,8 @@ const ( ) // Client represents the middleman for executing JSON RPC calls -// to remote NEO RPC nodes. +// to remote NEO RPC nodes. Client is thread-safe and can be used from +// multiple goroutines. type Client struct { cli *http.Client endpoint *url.URL diff --git a/pkg/rpc/client/wsclient.go b/pkg/rpc/client/wsclient.go index 3927af9c3..89bd4b934 100644 --- a/pkg/rpc/client/wsclient.go +++ b/pkg/rpc/client/wsclient.go @@ -22,6 +22,8 @@ import ( // servers. It's supposed to be faster than Client because it has persistent // connection to the server and at the same time is exposes some functionality // that is only provided via websockets (like event subscription mechanism). +// WSClient is thread-safe and can be used from multiple goroutines to perform +// RPC requests. type WSClient struct { Client // Notifications is a channel that is used to send events received from