light

package
v1.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: GPL-3.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJob

func AddJob(spec string, run RunFunc) *cron.Cron

Types

type BlockData

type BlockData struct {
	TxInfo TxInfo
	Out    txtool.Out
}

type BlockOut

type BlockOut struct {
	Num  uint64
	Data []BlockData
}

type BlockOutResp

type BlockOutResp struct {
	CurrentNum uint64
	BlockOuts  []BlockOut
}

type LightNode

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

func NewLightNode

func NewLightNode(dbPath string, txPool *core.TxPool, bcDB serodb.Database) (lightNode *LightNode)

func (*LightNode) CheckNil

func (self *LightNode) CheckNil(Nils []c_type.Uint256) (nilResps []NilValue, e error)

func (*LightNode) CurrentLight

func (self *LightNode) CurrentLight() *LightNode

func (*LightNode) GetOutsByPKr

func (self *LightNode) GetOutsByPKr(pkrs []c_type.PKr, start, end uint64) (br BlockOutResp, e error)

type NilValue

type NilValue struct {
	Nil    c_type.Uint256
	Num    uint64
	TxHash c_type.Uint256
	TxInfo TxInfo
}

type RunFunc

type RunFunc func()

type RunJob

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

func (*RunJob) Run

func (r *RunJob) Run()

type TxInfo

type TxInfo struct {
	TxHash    c_type.Uint256
	Num       uint64
	BlockHash common.Hash
	Gas       uint64
	GasUsed   uint64
	GasPrice  big.Int
	From      common.Address
	To        common.Address
	Time      big.Int
}

Jump to

Keyboard shortcuts

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