ticket

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 24 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *types.Consensus, sub []byte) queue.Module

New ticket's init env

Types

type Client

type Client struct {
	*drivers.BaseClient
	// contains filtered or unexported fields
}

Client export ticket client struct

func (*Client) CheckBlock

func (client *Client) CheckBlock(parent *types.Block, current *types.BlockDetail) error

CheckBlock ticket implete checkblock func

func (*Client) Close

func (client *Client) Close()

Close ticket close

func (*Client) CmpBestBlock

func (client *Client) CmpBestBlock(newBlock *types.Block, cmpBlock *types.Block) bool

CmpBestBlock 比较newBlock是不是最优区块,目前ticket主要是比较挖矿交易的难度系数

func (*Client) CreateBlock

func (client *Client) CreateBlock()

CreateBlock ticket create block func

func (*Client) CreateGenesisTx

func (client *Client) CreateGenesisTx() (ret []*types.Transaction)

CreateGenesisTx ticket create genesis tx

func (*Client) Miner

func (client *Client) Miner(block *types.Block) error

Miner ticket miner function

func (*Client) ProcEvent

func (client *Client) ProcEvent(msg *queue.Message) bool

ProcEvent ticket reply not support action err

func (*Client) Query_FlushTicket

func (client *Client) Query_FlushTicket(req *types.ReqNil) (types.Message, error)

Query_FlushTicket ticket query flush ticket function

func (*Client) Query_GetTicketCount

func (client *Client) Query_GetTicketCount(req *types.ReqNil) (types.Message, error)

Query_GetTicketCount ticket query ticket count function

Jump to

Keyboard shortcuts

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