diff --git a/pkg/rpc/rpc.go b/pkg/rpc/rpc.go index b2cf38953..272952f82 100644 --- a/pkg/rpc/rpc.go +++ b/pkg/rpc/rpc.go @@ -10,9 +10,9 @@ import ( "github.com/pkg/errors" ) -// GetBlock returns a block by its hash or index/height. If verbose is true +// getBlock returns a block by its hash or index/height. If verbose is true // the response will contain a pretty Block object instead of the raw hex string. -func (c *Client) GetBlock(indexOrHash interface{}, verbose bool) (*response, error) { +func (c *Client) getBlock(indexOrHash interface{}, verbose bool) (*response, error) { var ( params = newParams(indexOrHash) resp = &response{} @@ -78,8 +78,8 @@ func (c *Client) Invoke(script string, params []smartcontract.Parameter) (*Invok return resp, nil } -// GetRawTransaction queries a transaction by hash. -func (c *Client) GetRawTransaction(hash string, verbose bool) (*response, error) { +// getRawTransaction queries a transaction by hash. +func (c *Client) getRawTransaction(hash string, verbose bool) (*response, error) { var ( params = newParams(hash, verbose) resp = &response{} @@ -90,11 +90,11 @@ func (c *Client) GetRawTransaction(hash string, verbose bool) (*response, error) return resp, nil } -// SendRawTransaction broadcasts a transaction over the NEO network. +// sendRawTransaction broadcasts a transaction over the NEO network. // The given hex string needs to be signed with a keypair. // When the result of the response object is true, the TX has successfully // been broadcasted to the network. -func (c *Client) SendRawTransaction(rawTX string) (*response, error) { +func (c *Client) sendRawTransaction(rawTX string) (*response, error) { var ( params = newParams(rawTX) resp = &response{} @@ -132,7 +132,7 @@ func (c *Client) SendToAddress(asset util.Uint256, address string, amount util.F return nil, errors.Wrap(err, "failed to encode raw transaction to binary for `sendtoaddress`") } rawTxStr = hex.EncodeToString(buf.Bytes()) - if resp, err = c.SendRawTransaction(rawTxStr); err != nil { + if resp, err = c.sendRawTransaction(rawTxStr); err != nil { return nil, errors.Wrap(err, "failed to send raw transaction") } response.Error = resp.Error