cross

package
Version: v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCtxStoreConfig = CtxStoreConfig{
	Anchors:      []common.Address{},
	Rejournal:    time.Minute * 10,
	ValueLimit:   big.NewInt(1e18),
	AccountSlots: 5,
	GlobalSlots:  4096,
	AccountQueue: 5,
	GlobalQueue:  10,
}

Functions

This section is empty.

Types

type BlockChain

type BlockChain interface {
	core.ChainContext
	GetBlockNumber(hash common.Hash) *uint64
	GetHeaderByHash(hash common.Hash) *types.Header
	GetBlockByHash(hash common.Hash) *types.Block
	CurrentBlock() *types.Block
	StateAt(root common.Hash) (*state.StateDB, error)
}

type CtxStoreConfig

type CtxStoreConfig struct {
	ChainId      *big.Int
	Anchors      []common.Address
	IsAnchor     bool
	Rejournal    time.Duration // Time interval to regenerate the local transaction journal
	ValueLimit   *big.Int      // Minimum value to enforce for acceptance into the pool
	AccountSlots uint64        // Number of executable transaction slots guaranteed per account
	GlobalSlots  uint64        // Maximum number of executable transaction slots for all accounts
	AccountQueue uint64        // Maximum number of non-executable transaction slots permitted per account
	GlobalQueue  uint64        // Maximum number of non-executable transaction slots for all accounts
}

func (*CtxStoreConfig) Sanitize

func (config *CtxStoreConfig) Sanitize() CtxStoreConfig

type GasPriceOracle

type GasPriceOracle interface {
	SuggestPrice(ctx context.Context) (*big.Int, error)
}

type ProtocolManager

type ProtocolManager interface {
	NetworkId() uint64
	GetNonce(address common.Address) uint64
	AddLocals([]*types.Transaction)
	Pending() (map[common.Address]types.Transactions, error)
	CanAcceptTxs() bool
}

type SimpleChain

type SimpleChain interface {
	BlockChain() *core.BlockChain
	ChainConfig() *params.ChainConfig
	SignHash(hash []byte) ([]byte, error)
	GasOracle() *gasprice.Oracle
	ProtocolManager() ProtocolManager
	RegisterAPIs([]rpc.API)
	GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header, vmCfg vm.Config) (*vm.EVM, func() error, error)
	BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
	HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
	StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
}

type Transaction

type Transaction interface {
	BlockHash() common.Hash
}

Jump to

Keyboard shortcuts

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