chainhandler

package
v0.0.0-...-791c31d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockID2Num

func BlockID2Num(blockID []byte) uint32

Types

type Action

type Action struct {
	Account       string            `json:"account"`
	Name          string            `json:"name"`
	Authorization []PermissionLevel `json:"authorization"`
	Data          []byte            `json:"data"`
}

type Block

type Block struct {
	Producer         string            `json:"producer"`
	Num              uint32            `json:"num"`
	ID               types.Checksum256 `json:"id"`
	Previous         types.Checksum256 `json:"previous"`
	Confirmed        uint16            `json:"confirmed"`
	TransactionMRoot types.Checksum256 `json:"transaction_mroot"`
	ActionMRoot      types.Checksum256 `json:"action_mroot"`
}

func (*Block) GetNum

func (b *Block) GetNum() uint32

type ChainHandler

type ChainHandler struct {
	// contains filtered or unexported fields
}

func NewChainHandler

func NewChainHandler(h HandlerFunc, chainTyp types.ClientType) *ChainHandler

func (*ChainHandler) Close

func (c *ChainHandler) Close()

func (*ChainHandler) OnBlock

func (c *ChainHandler) OnBlock(block *types.BlockGeneralInfo) error

type HandlerFunc

type HandlerFunc func(block *Block, actions []Action)

type PermissionLevel

type PermissionLevel struct {
	Actor      string `json:"actor"`
	Permission string `json:"permission"`
}

Jump to

Keyboard shortcuts

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