Documentation
¶
Index ¶
- Variables
- func NewAddToBlacklistExclusionReq(ip string) *jsonrpc.Request
- func NewDisablePoWReq() *jsonrpc.Request
- func NewGetCurrentDSEpochReq() *jsonrpc.Request
- func NewGetCurrentMiniEpochReq() *jsonrpc.Request
- func NewGetDSCommitteeReq() *jsonrpc.Request
- func NewGetNodeStateReq() *jsonrpc.Request
- func NewGetNodeTypeReq() *jsonrpc.Request
- func NewGetPrevDSDifficultyReq() *jsonrpc.Request
- func NewGetPrevDifficultyReq() *jsonrpc.Request
- func NewGetSendSCCallsToDSReq() *jsonrpc.Request
- func NewIsTxnInMemPoolReq(txn string) *jsonrpc.Request
- func NewRemoveFromBlacklistExclusionReq(ip string) *jsonrpc.Request
- func NewReq(method MethodName, params interface{}) *jsonrpc.Request
- func NewToggleDisableTxnsReq() *jsonrpc.Request
- func NewToggleSendSCCallsToDSReq() *jsonrpc.Request
- type Client
- func (c *Client) CallBatch(req ...*jsonrpc.Request) ([]*jsonrpc.Response, error)
- func (c *Client) CallBatchContext(ctx context.Context, req ...*jsonrpc.Request) ([]*jsonrpc.Response, error)
- func (c *Client) GetCurrentDSEpoch() (int64, error)
- func (c *Client) GetCurrentDSEpochContext(ctx context.Context) (int64, error)
- func (c *Client) GetCurrentMiniEpoch() (int64, error)
- func (c *Client) GetCurrentMiniEpochContext(ctx context.Context) (int64, error)
- func (c *Client) GetNodeState() (NodeState, error)
- func (c *Client) GetNodeStateContext(ctx context.Context) (NodeState, error)
- func (c *Client) GetNodeType() (NodeType, error)
- func (c *Client) GetNodeTypeContext(ctx context.Context) (NodeType, error)
- func (c *Client) GetPrevDSDifficulty() (int64, error)
- func (c *Client) GetPrevDSDifficultyContext(ctx context.Context) (int64, error)
- func (c *Client) GetPrevDifficulty() (int64, error)
- func (c *Client) GetPrevDifficultyContext(ctx context.Context) (int64, error)
- type MethodName
- type NodeState
- type NodeType
- type NodeTypeName
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeStateStringMap = func(m map[string]NodeState) map[NodeState]string { rt := make(map[NodeState]string) for k, v := range m { rt[v] = k } return rt }(StringNodeStateMap)
View Source
var StringNodeStateMap = map[string]NodeState{ "POW_SUBMISSION": POW_SUBMISSION, "DSBLOCK_CONSENSUS_PREP": DSBLOCK_CONSENSUS_PREP, "DSBLOCK_CONSENSUS": DSBLOCK_CONSENSUS, "MICROBLOCK_SUBMISSION": MICROBLOCK_SUBMISSION, "FINALBLOCK_CONSENSUS_PREP": FINALBLOCK_CONSENSUS_PREP, "FINALBLOCK_CONSENSUS": FINALBLOCK_CONSENSUS, "VIEWCHANGE_CONSENSUS_PREP": VIEWCHANGE_CONSENSUS_PREP, "VIEWCHANGE_CONSENSUS": VIEWCHANGE_CONSENSUS, "ERROR": ERROR, "SYNC": SYNC, }
View Source
var UnknownResultType = errors.New("unknown result type")
method names
Functions ¶
func NewDisablePoWReq ¶
func NewGetCurrentDSEpochReq ¶
func NewGetDSCommitteeReq ¶
func NewGetNodeStateReq ¶
func NewGetNodeTypeReq ¶
func NewGetPrevDifficultyReq ¶
func NewIsTxnInMemPoolReq ¶
func NewReq ¶
func NewReq(method MethodName, params interface{}) *jsonrpc.Request
func NewToggleDisableTxnsReq ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallBatchContext ¶
func (*Client) GetCurrentDSEpoch ¶
func (*Client) GetCurrentDSEpochContext ¶
func (*Client) GetCurrentMiniEpoch ¶
func (*Client) GetCurrentMiniEpochContext ¶
func (*Client) GetNodeState ¶
func (*Client) GetNodeStateContext ¶
func (*Client) GetNodeType ¶
func (*Client) GetNodeTypeContext ¶
func (*Client) GetPrevDSDifficulty ¶
func (*Client) GetPrevDSDifficultyContext ¶
func (*Client) GetPrevDifficulty ¶
type MethodName ¶
type MethodName string
const ( GetCurrentMiniEpoch MethodName = "GetCurrentMiniEpoch" GetCurrentDSEpoch MethodName = "GetCurrentDSEpoch" GetNodeType MethodName = "GetNodeType" GetDSCommittee MethodName = "GetDSCommittee" GetNodeState MethodName = "GetNodeState" GetPrevDifficulty MethodName = "GetPrevDifficulty" GetPrevDSDifficulty MethodName = "GetPrevDSDifficulty" GetSendSCCallsToDS MethodName = "GetSendSCCallsToDS" IsTxnInMemPool MethodName = "IsTxnInMemPool" AddToBlacklistExclusion MethodName = "AddToBlacklistExclusion" RemoveFromBlacklistExclusion MethodName = "RemoveFromBlacklistExclusion" ToggleSendSCCallsToDS MethodName = "ToggleSendSCCallsToDS" DisablePoW MethodName = "DisablePoW" ToggleDisableTxns MethodName = "ToggleDisableTxns" )
type NodeType ¶
type NodeType struct { Type NodeTypeName ShardId int TillEpoch int }
func (*NodeType) UnmarshalJSON ¶
type NodeTypeName ¶
type NodeTypeName int
const ( NotInNetwork NodeTypeName = iota Seed Lookup DSNode ShardNode )
func (NodeTypeName) String ¶
func (n NodeTypeName) String() string
Click to show internal directories.
Click to hide internal directories.