solo

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNode

func NewNode(opts ...agency.ConfigOption) (agency.Order, error)

Types

type MempoolConfig added in v1.4.0

type MempoolConfig struct {
	BatchSize      uint64        `mapstructure:"batch_size"`
	PoolSize       uint64        `mapstructure:"pool_size"`
	TxSliceSize    uint64        `mapstructure:"tx_slice_size"`
	TxSliceTimeout time.Duration `mapstructure:"tx_slice_timeout"`
}

type Node

type Node struct {
	ID uint64

	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Node) Commit

func (n *Node) Commit() chan *pb.CommitEvent

func (*Node) DelNode added in v1.4.0

func (n *Node) DelNode(delID uint64) error

func (*Node) GetPendingNonceByAccount added in v1.0.1

func (n *Node) GetPendingNonceByAccount(account string) uint64

func (*Node) GetPendingTxByHash added in v1.9.0

func (n *Node) GetPendingTxByHash(hash *types.Hash) pb.Transaction

func (*Node) Prepare

func (n *Node) Prepare(tx pb.Transaction) error

func (*Node) Quorum

func (n *Node) Quorum() uint64

func (*Node) Ready

func (n *Node) Ready() error

func (*Node) ReportState

func (n *Node) ReportState(height uint64, blockHash *types.Hash, txHashList []*types.Hash)

func (*Node) Start

func (n *Node) Start() error

func (*Node) Step

func (n *Node) Step(msg []byte) error

func (*Node) Stop

func (n *Node) Stop()

func (*Node) SubscribeTxEvent added in v1.8.0

func (n *Node) SubscribeTxEvent(ch chan<- pb.Transactions) event.Subscription

type SOLO added in v1.4.0

type SOLO struct {
	BatchTimeout  time.Duration `mapstructure:"batch_timeout"`
	MempoolConfig MempoolConfig `mapstructure:"mempool"`
}

type SOLOConfig added in v1.4.0

type SOLOConfig struct {
	SOLO          SOLO
	TimedGenBlock TimedGenBlock `mapstructure:"timed_gen_block"`
}

type TimedGenBlock added in v1.12.0

type TimedGenBlock struct {
	Enable       bool          `toml:"enable" json:"enable"`
	BlockTimeout time.Duration `mapstructure:"block_timeout" json:"block_timeout"`
}

Jump to

Keyboard shortcuts

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