solo

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Overview

Package solo solo共识挖矿

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New new

Types

type Client

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

Client 客户端

func (*Client) CheckBlock

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

CheckBlock solo没有交易时返回错误

func (*Client) Close

func (client *Client) Close()

Close close

func (*Client) CmpBestBlock

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

CmpBestBlock 比较newBlock是不是最优区块

func (*Client) CreateBlock

func (client *Client) CreateBlock()

CreateBlock 创建区块

func (*Client) CreateGenesisTx

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

CreateGenesisTx 创建创世交易

func (*Client) GetGenesisBlockTime

func (client *Client) GetGenesisBlockTime() int64

GetGenesisBlockTime 获取创世区块时间

func (*Client) ProcEvent

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

ProcEvent false

Jump to

Keyboard shortcuts

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