coreth

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: LGPL-3.0 Imports: 18 Imported by: 0

README

coreth

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block = types.Block

type ETHChain

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

func NewETHChain

func NewETHChain(config *eth.Config, nodecfg *node.Config, etherBase *common.Address, chainDB ethdb.Database) *ETHChain

NewETHChain creates an Ethereum blockchain with the given configs.

func (*ETHChain) AddLocalTxs

func (self *ETHChain) AddLocalTxs(txs []*types.Transaction) []error

func (*ETHChain) AddRemoteTxs

func (self *ETHChain) AddRemoteTxs(txs []*types.Transaction) []error

func (*ETHChain) AttachEthService

func (self *ETHChain) AttachEthService(handler *rpc.Server, namespaces []string)

func (*ETHChain) BlockState

func (self *ETHChain) BlockState(block *types.Block) (*state.StateDB, error)

Returns a new mutable state based on the given block.

func (*ETHChain) CurrentState

func (self *ETHChain) CurrentState() (*state.StateDB, error)

Returns a new mutable state based on the current HEAD block.

func (*ETHChain) GenBlock

func (self *ETHChain) GenBlock()

func (*ETHChain) GetBlockByHash

func (self *ETHChain) GetBlockByHash(hash common.Hash) *types.Block

Retrives a block from the database by hash.

func (*ETHChain) GetGenesisBlock

func (self *ETHChain) GetGenesisBlock() *types.Block

func (*ETHChain) GetReceiptsByHash

func (self *ETHChain) GetReceiptsByHash(hash common.Hash) types.Receipts

func (*ETHChain) GetTxPool

func (self *ETHChain) GetTxPool() *core.TxPool

func (*ETHChain) GetTxSubmitCh

func (self *ETHChain) GetTxSubmitCh() <-chan struct{}

TODO: use SubscribeNewTxsEvent()

func (*ETHChain) InsertChain

func (self *ETHChain) InsertChain(chain []*types.Block) (int, error)

func (*ETHChain) NewRPCHandler

func (self *ETHChain) NewRPCHandler() *rpc.Server

func (*ETHChain) PendingSize

func (self *ETHChain) PendingSize() (int, error)

func (*ETHChain) SetOnAPIs

func (self *ETHChain) SetOnAPIs(cb dummy.OnAPIsCallbackType)

func (*ETHChain) SetOnFinalize

func (self *ETHChain) SetOnFinalize(cb dummy.OnFinalizeCallbackType)

func (*ETHChain) SetOnFinalizeAndAssemble

func (self *ETHChain) SetOnFinalizeAndAssemble(cb dummy.OnFinalizeAndAssembleCallbackType)

func (*ETHChain) SetOnHeaderNew

func (self *ETHChain) SetOnHeaderNew(cb func(*types.Header))

func (*ETHChain) SetOnQueryAcceptedBlock

func (self *ETHChain) SetOnQueryAcceptedBlock(cb func() *types.Block)

func (*ETHChain) SetOnSeal

func (self *ETHChain) SetOnSeal(cb func(*types.Block) error)

func (*ETHChain) SetOnSealDrop

func (self *ETHChain) SetOnSealDrop(cb func(*types.Block))

func (*ETHChain) SetOnSealFinish

func (self *ETHChain) SetOnSealFinish(cb func(*types.Block) error)

func (*ETHChain) SetOnSealHash

func (self *ETHChain) SetOnSealHash(cb func(*types.Header))

func (*ETHChain) SetTail

func (self *ETHChain) SetTail(hash common.Hash) error

SetTail sets the current head block to the one defined by the hash irrelevant what the chain contents were prior.

func (*ETHChain) Start

func (self *ETHChain) Start()

func (*ETHChain) Stop

func (self *ETHChain) Stop()

type Hash

type Hash = common.Hash

type Key

type Key struct {
	Address    common.Address
	PrivateKey *ecdsa.PrivateKey
}

func NewKey

func NewKey(rand io.Reader) (*Key, error)

func NewKeyFromECDSA

func NewKeyFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *Key

type Tx

type Tx = types.Transaction

Directories

Path Synopsis
cmd
geth
geth is the official command-line client for Ethereum.
geth is the official command-line client for Ethereum.
utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
consensus
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
eth
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
filters
Package filters implements an ethereum filtering system for block, transactions and log events.
Package filters implements an ethereum filtering system for block, transactions and log events.
Package ethstats implements the network stats reporting service.
Package ethstats implements the network stats reporting service.
examples
fc
internal
debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
ethapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
evm

Jump to

Keyboard shortcuts

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