rpc

package
v0.0.0-...-9b2c719 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.RWMutex

	URL *url.URL

	FailsCount uint64
	// contains filtered or unexported fields
}

Client struct

func New

func New(rawURLs string, timeout time.Duration) (*Client, error)

New func

func (*Client) Check

func (r *Client) Check() (bool, error)

Check func

func (*Client) GetWork

func (r *Client) GetWork() ([]string, error)

GetWork func

func (*Client) Sick

func (r *Client) Sick() bool

Sick func

func (*Client) SubmitHashrate

func (r *Client) SubmitHashrate(params interface{}) (bool, error)

SubmitHashrate func

func (*Client) SubmitWork

func (r *Client) SubmitWork(params interface{}) (bool, error)

SubmitWork func

type GetBlockReply

type GetBlockReply struct {
	Number     string `json:"number"`
	Difficulty string `json:"difficulty"`
}

GetBlockReply struct

type JSONRpcResp

type JSONRpcResp struct {
	ID     *json.RawMessage       `json:"id"`
	Result *json.RawMessage       `json:"result"`
	Error  map[string]interface{} `json:"error"`
}

JSONRpcResp struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL