evm

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: ISC Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MeerEVMID = "meerevm"
)

meerevm ID of the platform

Variables

This section is empty.

Functions

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type Block

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

func (*Block) Accept

func (b *Block) Accept() error

func (*Block) Bytes

func (b *Block) Bytes() []byte

func (*Block) Hash added in v1.0.20

func (b *Block) Hash() common.Hash

func (*Block) Height

func (b *Block) Height() uint64

func (*Block) ID

func (b *Block) ID() *hash.Hash

func (*Block) Number added in v1.0.20

func (b *Block) Number() uint64

func (*Block) Parent

func (b *Block) Parent() *hash.Hash

func (*Block) ParentState added in v1.0.21

func (b *Block) ParentState() model.BlockState

func (*Block) Reject

func (b *Block) Reject() error

func (*Block) SetStatus

func (b *Block) SetStatus(status consensus.Status)

func (*Block) StateRoot added in v1.0.20

func (b *Block) StateRoot() common.Hash

func (*Block) Status

func (b *Block) Status() consensus.Status

func (*Block) String

func (b *Block) String() string

func (*Block) Timestamp

func (b *Block) Timestamp() time.Time

func (*Block) Transactions

func (b *Block) Transactions() []model.Tx

func (*Block) Verify

func (b *Block) Verify() error

type VM

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

func New

func New() *VM

func (*VM) AddTxToMempool

func (vm *VM) AddTxToMempool(tx *qtypes.Transaction, local bool) (int64, error)

func (*VM) BlockChain added in v1.0.21

func (vm *VM) BlockChain() *core.BlockChain

func (*VM) Bootstrapped

func (vm *VM) Bootstrapped() error

func (*VM) Bootstrapping

func (vm *VM) Bootstrapping() error

func (*VM) BuildBlock

func (vm *VM) BuildBlock(txs []model.Tx) (consensus.Block, error)

func (*VM) ChainDatabase added in v1.0.21

func (vm *VM) ChainDatabase() ethdb.Database

func (*VM) CheckConnectBlock

func (vm *VM) CheckConnectBlock(block consensus.Block) error

func (*VM) ConnectBlock

func (vm *VM) ConnectBlock(block consensus.Block) (uint64, error)

func (*VM) DisconnectBlock

func (vm *VM) DisconnectBlock(block consensus.Block) (uint64, error)

func (*VM) Genesis

func (vm *VM) Genesis() *hash.Hash

func (*VM) GetBalance

func (vm *VM) GetBalance(addre string) (int64, error)

func (*VM) GetBlock

func (vm *VM) GetBlock(bh *hash.Hash) (consensus.Block, error)

func (*VM) GetBlockByNumber added in v1.0.20

func (vm *VM) GetBlockByNumber(num uint64) (consensus.Block, error)

func (*VM) GetBlockIDByTxHash added in v1.0.19

func (vm *VM) GetBlockIDByTxHash(txhash *hash.Hash) uint64

func (*VM) GetCurHeader added in v1.0.21

func (vm *VM) GetCurHeader() *types.Header

func (*VM) GetCurStateRoot added in v1.0.21

func (vm *VM) GetCurStateRoot() common.Hash

func (*VM) GetID

func (vm *VM) GetID() string

func (*VM) GetMempoolSize

func (vm *VM) GetMempoolSize() int64

func (*VM) GetTxsFromMempool

func (vm *VM) GetTxsFromMempool() ([]*qtypes.Transaction, []*hash.Hash, error)

func (*VM) HasTx added in v1.0.21

func (vm *VM) HasTx(h *hash.Hash) bool

func (*VM) Initialize

func (vm *VM) Initialize(ctx consensus.Context) error

func (*VM) LastAccepted

func (vm *VM) LastAccepted() (*hash.Hash, error)

func (*VM) ParseBlock

func (vm *VM) ParseBlock([]byte) (consensus.Block, error)

func (*VM) PrepareEnvironment added in v1.0.21

func (vm *VM) PrepareEnvironment(state model.BlockState) (*types.Header, error)

func (*VM) RegisterAPIs

func (vm *VM) RegisterAPIs(apis []api.API)

func (*VM) RemoveTxFromMempool

func (vm *VM) RemoveTxFromMempool(tx *qtypes.Transaction) error

func (*VM) ResetTemplate

func (vm *VM) ResetTemplate() error

func (*VM) RewindTo added in v1.0.21

func (vm *VM) RewindTo(state model.BlockState) error

func (*VM) SetLogLevel

func (vm *VM) SetLogLevel(level string)

func (*VM) Shutdown

func (vm *VM) Shutdown() error

func (*VM) VerifyTx

func (vm *VM) VerifyTx(tx model.Tx) (int64, error)

func (*VM) VerifyTxSanity

func (vm *VM) VerifyTxSanity(tx model.Tx) error

func (*VM) Version

func (vm *VM) Version() string

Jump to

Keyboard shortcuts

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