diff --git a/gethrpc/json.go b/gethrpc/json.go index e991363a2..c14c95814 100644 --- a/gethrpc/json.go +++ b/gethrpc/json.go @@ -226,7 +226,7 @@ func (c *jsonCodec) Closed() <-chan interface{} { return c.closed } -// parseMessage parses raw bytes as a (batch of) JSON-RPC message(s). There are no error +// parseMessage parses raw bytes as a (batch of) JSON-RPC message(s). There is no error // checks in this function because the raw message has already been syntax-checked when it // is called. Any non-JSON-RPC messages in the input return the zero value of // jsonrpcMessage. diff --git a/gethrpc/subscription.go b/gethrpc/subscription.go index d972244db..26c58054a 100644 --- a/gethrpc/subscription.go +++ b/gethrpc/subscription.go @@ -47,7 +47,7 @@ func NewID() ID { return globalGen() } -// randomIDGenerator returns a function generates a random IDs. +// randomIDGenerator returns a function that generates a random IDs. func randomIDGenerator() func() ID { seed, err := binary.ReadVarint(bufio.NewReader(crand.Reader)) if err != nil { @@ -97,7 +97,7 @@ type Notifier struct { // CreateSubscription returns a new subscription that is coupled to the // RPC connection. By default subscriptions are inactive and notifications // are dropped until the subscription is marked as active. This is done -// by the RPC server after the subscription ID is send to the client. +// by the RPC server after the subscription ID is sent to the client. func (n *Notifier) CreateSubscription() *Subscription { n.mu.Lock() defer n.mu.Unlock() @@ -152,7 +152,7 @@ func (n *Notifier) takeSubscription() *Subscription { } // activate is called after the subscription ID was sent to client. Notifications are -// buffered before activation. This prevents notifications being sent to the client before +// buffered before activation. This prevents notifications from being sent to the client before // the subscription ID is sent to the client. func (n *Notifier) activate() error { n.mu.Lock() diff --git a/registry/REGISTRY.md b/registry/REGISTRY.md index b0ad02aa5..4bca54bbd 100644 --- a/registry/REGISTRY.md +++ b/registry/REGISTRY.md @@ -3,7 +3,7 @@ The GSRPC Registry can parse target metadata information into an in-memory regis By leveraging the on-chain metadata, GSRPC is more robust to changes on types, allowing clients to only keep updated the types that are relevant to their business operation. -This registry can be used afterwards to decode data read from live chains (events & extrinsics). +This registry can be used afterwards to decode data read from live chains (events & extrinsic). ## How to parse events and its types First we instantiate the API with the client node and open a connection: @@ -80,4 +80,4 @@ On the other hand, since a great majority of chains do not need to change these #### Using Chain Defaults [TestExtrinsicRetriever_NewDefault](retriever/extrinsic_retriever_test.go#L179) #### Using Custom core types -[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go) \ No newline at end of file +[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go)