itxprocessor

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result interface {
	GetOutsMerkleTree() *merkle.FullMerkleTree
	GetMerkleRoot() *merkle.MerkleHash
	GetSuccessfulTxs() []*wire.MsgTx
	GetOutStates() []*wire.OutState
	GetSmartContracts() []*wire.SmartContract
	GetUpdateActions() []*wire.UpdateAction
	GetReduceActions() []*wire.ReduceAction
}

Result of executing txs. After executing txs, a list of new out states are generated. And a merkle tree is build for these out states. Besides, Result interface also stores the list of txs which are successfully executed. This list excludes txs which encounter any error. So when proposing blocks, use the successful txs instead of original candidate txs.

type TxProcessor

type TxProcessor interface {
	AddTx(tx *wire.MsgTx)
	Execute(proposeHeight int64) Result
}

TxProcessor interface which executes txs for one block. Before proposing a block, add all candidate txs into txprocessor. Then run TxProcessor#Execute() which will generate a Result object. See interface Result for more info about what's in it.

Jump to

Keyboard shortcuts

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