engine

package
v0.0.0-...-77dcbbd Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package engine implements blockchain engine using other packages. It is responsible for handling network, consensus, transaction pool management and block generation.

Index

Constants

View Source
const (
	RPCEventChainNewBlock          = "chain_newBlock"
	RPCEventChainDeleteBlock       = "chain_deleteBlock"
	RPCEventChainForked            = "chain_forked"
	RPCEventChainValidatorsChanged = "chain_validatorsChanged"
	RPCEventNetworkNewBlock        = "network_newBlock"
	RPCEventNetworkNewTransaction  = "network_newTransaction"
	RPCEventTxpoolNewTransaction   = "txpool_newTransaction"
)
View Source
const (
	// NetworkVersion specifies the network protocol.
	NetworkVersion = "1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(abi labi.ABI, config *config.Config) *Engine

func (*Engine) Start

func (e *Engine) Start() error

func (*Engine) Stop

func (e *Engine) Stop()

type EventBlockHeader

type EventBlockHeader struct {
	BlockHeader *blockchain.BlockHeader `json:"blockHeader"`
}

type EventTransaction

type EventTransaction struct {
	Transaction *blockchain.Transaction `json:"transaction"`
}

type EventTransactionIDs

type EventTransactionIDs struct {
	TransactionIDs []codec.Hex `json:"transactionIDs"`
}

type EventValidatorChange

type EventValidatorChange struct {
	Validators           []*labi.Validator `json:"nextValidators"`
	PrecommitThreshold   uint64            `json:"precommitThreshold,string"`
	CertificateThreshold uint64            `json:"certificateThreshold,string"`
}

Directories

Path Synopsis
Package config provides config structure for engine.
Package config provides config structure for engine.
Package endpoint implements RPC endpoint handlers for engine.
Package endpoint implements RPC endpoint handlers for engine.

Jump to

Keyboard shortcuts

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