light

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: GPL-3.0 Imports: 17 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 BlocOuts

type BlocOuts []BlockOut

func (BlocOuts) Len

func (s BlocOuts) Len() int

func (BlocOuts) Less

func (s BlocOuts) Less(i, j int) bool

func (BlocOuts) Swap

func (s BlocOuts) Swap(i, j int)

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
	PageSize   uint64
}

type LightNode

type LightNode struct {
	// contains filtered or unexported fields
}
var Current_light *LightNode

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 uint64, end *uint64) (br BlockOutResp, e error)

func (*LightNode) GetPendingOuts

func (self *LightNode) GetPendingOuts(pkrs []c_type.PKr) (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