vm_direct

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPublic

func IsPublic() bool

func SendBlockReward

func SendBlockReward(bState *state.BlockState, coinbaseAccount []byte) error

Types

type ChainType

type ChainType int
const (
	ChainTypeMainNet ChainType = iota
	ChainTypeTestNet
	ChainTypeUnitTest
)

type DummyChain

type DummyChain struct {
	HardforkConfig *config.HardforkConfig
	// contains filtered or unexported fields
}

func LoadDummyChainEx

func LoadDummyChainEx(chainType ChainType) (*DummyChain, error)

func (*DummyChain) BestBlockNo

func (bc *DummyChain) BestBlockNo() uint64

func (*DummyChain) ExecuteTxs

func (bc *DummyChain) ExecuteTxs(txs []*types.Tx) ([]*types.Receipt, error)

func (*DummyChain) GetBestBlock

func (bc *DummyChain) GetBestBlock() (*types.Block, error)

func (*DummyChain) GetBlockByNo

func (bc *DummyChain) GetBlockByNo(blockNo types.BlockNo) (*types.Block, error)

func (*DummyChain) Release

func (bc *DummyChain) Release()

func (*DummyChain) SetBestBlockId

func (bc *DummyChain) SetBestBlockId(value []byte)

func (*DummyChain) SetBestBlockNo

func (bc *DummyChain) SetBestBlockNo(value uint64)

func (*DummyChain) SetCoinbaseAccount

func (bc *DummyChain) SetCoinbaseAccount(address []byte)

func (*DummyChain) SetTimestamp

func (bc *DummyChain) SetTimestamp(value int64)

type TxExecFn

type TxExecFn func(blockState *state.BlockState, tx types.Transaction) error

func NewTxExecutor

func NewTxExecutor(execCtx context.Context, ccc consensus.ChainConsensusCluster, cdb contract.ChainAccessor, bi *types.BlockHeaderInfo, executionMode int) TxExecFn

type ValidatePostFn

type ValidatePostFn func() error

Jump to

Keyboard shortcuts

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