Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrGetBlockData cannot get block data from server ErrGetBlockData = fmt.Errorf("cannot get block data") //ErrGetCurrentBlockNum cannot get current block number from server ErrGetCurrentBlockNum = fmt.Errorf("cannnot get current block number from RPC response") )
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
Blockchain contains pointer to a RPC client object
func (*Blockchain) GenerateBlockEvent ¶
func (bc *Blockchain) GenerateBlockEvent(blockNum int) beat.Event
GenerateBlockEvent returns beat event
func (*Blockchain) GetBlock ¶
func (bc *Blockchain) GetBlock(blockNum int) (common.MapStr, error)
GetBlock gets the block information
func (*Blockchain) GetCurrentBlock ¶
func (bc *Blockchain) GetCurrentBlock() (int, error)
GetCurrentBlock gets the current block number
Click to show internal directories.
Click to hide internal directories.