Documentation ¶
Overview ¶
Package eth implements the Ethereum protocol.
Index ¶
- type Config
- type Ethereum
- func (s *Ethereum) APIs() []rpc.API
- func (s *Ethereum) AccountManager() *accounts.Manager
- func (s *Ethereum) ArchiveMode() bool
- func (s *Ethereum) BlockChain() *core.BlockChain
- func (s *Ethereum) BloomIndexer() *core.ChainIndexer
- func (s *Ethereum) BroadcastBlockToAll(block *types.Block)
- func (s *Ethereum) ChainDb() ethdb.Database
- func (s *Ethereum) Downloader() *downloader.Downloader
- func (s *Ethereum) EcConnector() *ecconnector.EcConnector
- func (s *Ethereum) Engine() consensus.Engine
- func (s *Ethereum) Etherbase() (eb common.Address, err error)
- func (s *Ethereum) EventMux() *event.TypeMux
- func (s *Ethereum) IsListening() bool
- func (s *Ethereum) IsMining() bool
- func (s *Ethereum) Miner() *miner.Miner
- func (s *Ethereum) Protocols() []p2p.Protocol
- func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block)
- func (s *Ethereum) SendNewBlock(pidList []string, block *types.Block, td *big.Int)
- func (s *Ethereum) SetEtherbase(etherbase common.Address)
- func (s *Ethereum) Start() error
- func (s *Ethereum) StartMining(threads int) error
- func (s *Ethereum) Stop() error
- func (s *Ethereum) StopMining()
- func (s *Ethereum) Synced() bool
- func (s *Ethereum) TxPool() *core.TxPool
- type PublicEcConnectorAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config contains the configuration options of the ETH protocol. Deprecated: use ethconfig.Config instead.
type Ethereum ¶
type Ethereum struct { APIBackend *EthAPIBackend // contains filtered or unexported fields }
Ethereum implements the Ethereum full node service.
func New ¶
New creates a new Ethereum object (including the initialisation of the common Ethereum object)
func (*Ethereum) APIs ¶
APIs return the collection of RPC services the ethereum package offers. NOTE, some of these services probably need to be moved to somewhere else.
func (*Ethereum) AccountManager ¶
func (*Ethereum) ArchiveMode ¶
func (*Ethereum) BlockChain ¶
func (s *Ethereum) BlockChain() *core.BlockChain
func (*Ethereum) BloomIndexer ¶
func (s *Ethereum) BloomIndexer() *core.ChainIndexer
func (*Ethereum) BroadcastBlockToAll ¶
func (*Ethereum) Downloader ¶
func (s *Ethereum) Downloader() *downloader.Downloader
func (*Ethereum) EcConnector ¶
func (s *Ethereum) EcConnector() *ecconnector.EcConnector
for accessing ecconnector: by yim, etri
func (*Ethereum) IsListening ¶
func (*Ethereum) Protocols ¶
Protocols returns all the currently configured network protocols to start.
func (*Ethereum) ResetWithGenesisBlock ¶
func (*Ethereum) SendNewBlock ¶
func (*Ethereum) SetEtherbase ¶
SetEtherbase sets the mining reward address.
func (*Ethereum) Start ¶
Start implements node.Lifecycle, starting all internal goroutines needed by the Ethereum protocol implementation.
func (*Ethereum) StartMining ¶
StartMining starts the miner with the given number of CPU threads. If mining is already running, this method adjust the number of threads allowed to use and updates the minimum price required by the transaction pool.
func (*Ethereum) Stop ¶
Stop implements node.Lifecycle, terminating all internal goroutines used by the Ethereum protocol.
func (*Ethereum) StopMining ¶
func (s *Ethereum) StopMining()
StopMining terminates the miner, both at the consensus engine level as well as at the block creation level.
type PublicEcConnectorAPI ¶
type PublicEcConnectorAPI struct {
// contains filtered or unexported fields
}
PublicEcConnectorAPI provides an API to access ecconnector in order to interconnect with External consensu Engine this time, it is implemented as Public, later I'll consider to change it as Private
func NewPublicEcConnectorAPI ¶
func NewPublicEcConnectorAPI(e *Ethereum) *PublicEcConnectorAPI
NewPublicEthereumAPI creates a new Ethereum protocol API for full nodes.
func (*PublicEcConnectorAPI) BuildBlock ¶
func (api *PublicEcConnectorAPI) BuildBlock(cBlkNo uint64) (string, error)
func (*PublicEcConnectorAPI) GetLastBlockNum ¶
func (api *PublicEcConnectorAPI) GetLastBlockNum() uint64
func (*PublicEcConnectorAPI) HeartBeat ¶
func (api *PublicEcConnectorAPI) HeartBeat() string
let's implement dummy API
func (*PublicEcConnectorAPI) SealBlock ¶
func (api *PublicEcConnectorAPI) SealBlock(blockno uint64, bhash string, proof *ecpon.BlockProof) error
Directories ¶
Path | Synopsis |
---|---|
Package ethconfig contains the configuration of the ETH and LES protocols.
|
Package ethconfig contains the configuration of the ETH and LES protocols. |
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. |
protocols
|
|