Documentation ¶
Index ¶
- Variables
- type Block
- type ETHChain
- func (self *ETHChain) AddLocalTxs(txs []*types.Transaction) []error
- func (self *ETHChain) AddRemoteTxs(txs []*types.Transaction) []error
- func (self *ETHChain) AttachEthService(handler *rpc.Server, namespaces []string)
- func (self *ETHChain) BlockState(block *types.Block) (*state.StateDB, error)
- func (self *ETHChain) CurrentState() (*state.StateDB, error)
- func (self *ETHChain) GenBlock()
- func (self *ETHChain) GetBlockByHash(hash common.Hash) *types.Block
- func (self *ETHChain) GetGenesisBlock() *types.Block
- func (self *ETHChain) GetReceiptsByHash(hash common.Hash) types.Receipts
- func (self *ETHChain) GetTxPool() *core.TxPool
- func (self *ETHChain) GetTxSubmitCh() <-chan struct{}
- func (self *ETHChain) InsertChain(chain []*types.Block) (int, error)
- func (self *ETHChain) NewRPCHandler() *rpc.Server
- func (self *ETHChain) PendingSize() (int, error)
- func (self *ETHChain) SetOnAPIs(cb dummy.OnAPIsCallbackType)
- func (self *ETHChain) SetOnExtraStateChange(cb dummy.OnExtraStateChangeType)
- func (self *ETHChain) SetOnFinalize(cb dummy.OnFinalizeCallbackType)
- func (self *ETHChain) SetOnFinalizeAndAssemble(cb dummy.OnFinalizeAndAssembleCallbackType)
- func (self *ETHChain) SetOnHeaderNew(cb func(*types.Header))
- func (self *ETHChain) SetOnQueryAcceptedBlock(cb func() *types.Block)
- func (self *ETHChain) SetOnSeal(cb func(*types.Block) error)
- func (self *ETHChain) SetOnSealDrop(cb func(*types.Block))
- func (self *ETHChain) SetOnSealFinish(cb func(*types.Block) error)
- func (self *ETHChain) SetOnSealHash(cb func(*types.Header))
- func (self *ETHChain) SetTail(hash common.Hash) error
- func (self *ETHChain) Start()
- func (self *ETHChain) Stop()
- func (self *ETHChain) SubscribeNewMinedBlockEvent() *event.TypeMuxSubscription
- func (self *ETHChain) VerifyBlock(block *types.Block) bool
- type Hash
- type Key
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BlackholeAddr = common.Address{
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}
)
Functions ¶
This section is empty.
Types ¶
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 (*ETHChain) BlockState ¶
Returns a new mutable state based on the given block.
func (*ETHChain) CurrentState ¶
Returns a new mutable state based on the current HEAD block.
func (*ETHChain) GetBlockByHash ¶
Retrives a block from the database by hash.
func (*ETHChain) GetGenesisBlock ¶
func (*ETHChain) GetReceiptsByHash ¶
func (*ETHChain) GetTxSubmitCh ¶
func (self *ETHChain) GetTxSubmitCh() <-chan struct{}
TODO: use SubscribeNewTxsEvent()
func (*ETHChain) NewRPCHandler ¶
func (*ETHChain) PendingSize ¶
func (*ETHChain) SetOnAPIs ¶
func (self *ETHChain) SetOnAPIs(cb dummy.OnAPIsCallbackType)
func (*ETHChain) SetOnExtraStateChange ¶ added in v0.2.12
func (self *ETHChain) SetOnExtraStateChange(cb dummy.OnExtraStateChangeType)
func (*ETHChain) SetOnFinalize ¶
func (self *ETHChain) SetOnFinalize(cb dummy.OnFinalizeCallbackType)
func (*ETHChain) SetOnFinalizeAndAssemble ¶
func (self *ETHChain) SetOnFinalizeAndAssemble(cb dummy.OnFinalizeAndAssembleCallbackType)
func (*ETHChain) SetOnHeaderNew ¶
func (*ETHChain) SetOnQueryAcceptedBlock ¶
func (*ETHChain) SetOnSealDrop ¶
func (*ETHChain) SetOnSealFinish ¶
func (*ETHChain) SetOnSealHash ¶
func (*ETHChain) SetTail ¶
SetTail sets the current head block to the one defined by the hash irrelevant what the chain contents were prior.
func (*ETHChain) SubscribeNewMinedBlockEvent ¶ added in v0.3.1
func (self *ETHChain) SubscribeNewMinedBlockEvent() *event.TypeMuxSubscription
type Key ¶
type Key struct { Address common.Address PrivateKey *ecdsa.PrivateKey }
func NewKeyFromECDSA ¶
func NewKeyFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *Key
type Tx ¶
type Tx = types.Transaction
Directories ¶
Path | Synopsis |
---|---|
Package accounts implements high level Ethereum account management.
|
Package accounts implements high level Ethereum account management. |
keystore
Package keystore implements encrypted storage of secp256k1 private keys.
|
Package keystore implements encrypted storage of secp256k1 private keys. |
Package consensus implements different Ethereum consensus engines.
|
Package consensus implements different Ethereum consensus engines. |
clique
Package clique implements the proof-of-authority consensus engine.
|
Package clique implements the proof-of-authority consensus engine. |
ethash
Package ethash implements the ethash proof-of-work consensus engine.
|
Package ethash implements the ethash proof-of-work consensus engine. |
Package core implements the Ethereum consensus protocol.
|
Package core implements the Ethereum consensus protocol. |
bloombits
Package bloombits implements bloom filtering on batches of data.
|
Package bloombits implements bloom filtering on batches of data. |
forkid
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
|
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124). |
rawdb
Package rawdb contains a collection of low level database accessors.
|
Package rawdb contains a collection of low level database accessors. |
state
Package state provides a caching layer atop the Ethereum state trie.
|
Package state provides a caching layer atop the Ethereum state trie. |
state/snapshot
Package snapshot implements a journalled, dynamic state dump.
|
Package snapshot implements a journalled, dynamic state dump. |
types
Package types contains data types related to Ethereum consensus.
|
Package types contains data types related to Ethereum consensus. |
vm
Package vm implements the Ethereum Virtual Machine.
|
Package vm implements the Ethereum Virtual Machine. |
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. |
tracers
Package tracers is a collection of JavaScript transaction tracers.
|
Package tracers is a collection of JavaScript transaction tracers. |
tracers/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
|
Package tracers contains the actual JavaScript tracer assets. |
Package ethstats implements the network stats reporting service.
|
Package ethstats implements the network stats reporting service. |
examples
|
|
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. |
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
|
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports. |
Click to show internal directories.
Click to hide internal directories.