Versions in this module Expand all Collapse all v1 v1.0.2 Dec 20, 2016 Changes in this version + const BlockBodiesMsg + const BlockHeadersMsg + const ErrDecode + const ErrExtraStatusMsg + const ErrGenesisBlockMismatch + const ErrInvalidMsgCode + const ErrMsgTooLarge + const ErrNetworkIdMismatch + const ErrNoStatusMsg + const ErrProtocolVersionMismatch + const ErrSuspendedPeer + const GetBlockBodiesMsg + const GetBlockHeadersMsg + const GetNodeDataMsg + const GetReceiptsMsg + const NetworkId + const NewBlockHashesMsg + const NewBlockMsg + const NodeDataMsg + const ProtocolMaxMsgSize + const ReceiptsMsg + const StatusMsg + const TxMsg + var EnableBadBlockReporting = false + var ProtocolLengths = []uint64 + var ProtocolName = "eth" + var ProtocolVersions = []uint + func CreatePoW(config *Config) (*ethash.Ethash, error) + func SetupGenesisBlock(chainDb *ethdb.Database, config *Config) error + type BlockTraceResult struct + Error string + StructLogs []ethapi.StructLogRes + Validated bool + type Config struct + AutoDAG bool + ChainConfig *core.ChainConfig + DatabaseCache int + DatabaseHandles int + DocRoot string + EnableJit bool + EnableNodePermission bool + Etherbase common.Address + ExtraData []byte + ForceJit bool + Genesis string + MinerThreads int + NatSpec bool + NetworkId int + PowShared bool + PowTest bool + SingleBlockMaker bool + SkipBcVersionCheck bool + SolcPath string + TestGenesisBlock *types.Block + TestGenesisState ethdb.Database + VoteMaxBlockTime uint + VoteMinBlockTime uint + type ContractBackend struct + func NewContractBackend(eth *Ethereum) *ContractBackend + func (b *ContractBackend) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNum *big.Int) ([]byte, error) + func (b *ContractBackend) CodeAt(ctx context.Context, contract common.Address, blockNum *big.Int) ([]byte, error) + func (b *ContractBackend) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (*big.Int, error) + func (b *ContractBackend) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) + func (b *ContractBackend) PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error) + func (b *ContractBackend) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) + func (b *ContractBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error + func (b *ContractBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error) + type EthApiBackend struct + func (b *EthApiBackend) AccountManager() *accounts.Manager + func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) + func (b *EthApiBackend) ChainDb() ethdb.Database + func (b *EthApiBackend) Downloader() *downloader.Downloader + func (b *EthApiBackend) EventMux() *event.TypeMux + func (b *EthApiBackend) GetBlock(ctx context.Context, blockHash common.Hash) (*types.Block, error) + func (b *EthApiBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error) + func (b *EthApiBackend) GetPoolTransaction(hash common.Hash) *types.Transaction + func (b *EthApiBackend) GetPoolTransactions() types.Transactions + func (b *EthApiBackend) GetReceipts(ctx context.Context, blockHash common.Hash) (types.Receipts, error) + func (b *EthApiBackend) GetTd(blockHash common.Hash) *big.Int + func (b *EthApiBackend) GetVMEnv(ctx context.Context, msg core.Message, state ethapi.State, ...) (vm.Environment, func() error, error) + func (b *EthApiBackend) HeaderByNumber(blockNr rpc.BlockNumber) *types.Header + func (b *EthApiBackend) ProtocolVersion() int + func (b *EthApiBackend) RemoveTx(txHash common.Hash) + func (b *EthApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (b *EthApiBackend) SetHead(number uint64) + func (b *EthApiBackend) StateAndHeaderByNumber(blockNr rpc.BlockNumber) (ethapi.State, *types.Header, error) + func (b *EthApiBackend) Stats() (pending int, queued int) + func (b *EthApiBackend) SuggestPrice(ctx context.Context) (*big.Int, error) + func (b *EthApiBackend) TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + type EthApiState struct + func (s EthApiState) GetBalance(ctx context.Context, addr common.Address) (*big.Int, error) + func (s EthApiState) GetCode(ctx context.Context, addr common.Address) ([]byte, error) + func (s EthApiState) GetNonce(ctx context.Context, addr common.Address) (uint64, error) + func (s EthApiState) GetState(ctx context.Context, a common.Address, b common.Hash) (common.Hash, error) + type EthNodeInfo struct + Difficulty *big.Int + Genesis common.Hash + Head common.Hash + Network int + type Ethereum struct + AutoDAG bool + NatSpec bool + PowTest bool + func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) + func (s *Ethereum) APIs() []rpc.API + func (s *Ethereum) AccountManager() *accounts.Manager + func (s *Ethereum) BlockChain() *core.BlockChain + func (s *Ethereum) ChainDb() ethdb.Database + func (s *Ethereum) Downloader() *downloader.Downloader + func (s *Ethereum) EthVersion() int + func (s *Ethereum) Etherbase() (eb common.Address, err error) + func (s *Ethereum) EventMux() *event.TypeMux + func (s *Ethereum) IsListening() bool + func (s *Ethereum) NetVersion() int + func (s *Ethereum) Pow() *ethash.Ethash + func (s *Ethereum) Protocols() []p2p.Protocol + func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) + func (s *Ethereum) Start(srvr *p2p.Server) error + func (s *Ethereum) StartBlockVoting(client *rpc.Client, voteKey, blockMakerKey *ecdsa.PrivateKey) error + func (s *Ethereum) Stop() error + func (s *Ethereum) TxPool() *core.TxPool + func (s *Ethereum) WaitForShutdown() + func (self *Ethereum) HTTPClient() *httpclient.HTTPClient + func (self *Ethereum) SetEtherbase(etherbase common.Address) + func (self *Ethereum) StartAutoDAG() + func (self *Ethereum) StopAutoDAG() + type PeerInfo struct + Difficulty *big.Int + Head string + Version int + type PrivateAdminAPI struct + func NewPrivateAdminAPI(eth *Ethereum) *PrivateAdminAPI + func (api *PrivateAdminAPI) ExportChain(file string) (bool, error) + func (api *PrivateAdminAPI) ImportChain(file string) (bool, error) + type PrivateDebugAPI struct + func NewPrivateDebugAPI(config *core.ChainConfig, eth *Ethereum) *PrivateDebugAPI + func (api *PrivateDebugAPI) TraceBlock(blockRlp []byte, config *vm.LogConfig) BlockTraceResult + func (api *PrivateDebugAPI) TraceBlockByHash(hash common.Hash, config *vm.LogConfig) BlockTraceResult + func (api *PrivateDebugAPI) TraceBlockByNumber(number uint64, config *vm.LogConfig) BlockTraceResult + func (api *PrivateDebugAPI) TraceBlockFromFile(file string, config *vm.LogConfig) BlockTraceResult + func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, txHash common.Hash, config *TraceArgs) (interface{}, error) + type ProtocolManager struct + SubProtocols []p2p.Protocol + func NewProtocolManager(config *core.ChainConfig, singleMiner bool, networkId int, mux *event.TypeMux, ...) (*ProtocolManager, error) + func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) + func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction) + func (pm *ProtocolManager) Start() + func (pm *ProtocolManager) Stop() + func (self *ProtocolManager) NodeInfo() *EthNodeInfo + type PublicDebugAPI struct + func NewPublicDebugAPI(eth *Ethereum) *PublicDebugAPI + func (api *PublicDebugAPI) DumpBlock(number uint64, typ string) (state.Dump, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(e *Ethereum) *PublicEthereumAPI + func (s *PublicEthereumAPI) Coinbase() (common.Address, error) + func (s *PublicEthereumAPI) Etherbase() (common.Address, error) + func (s *PublicEthereumAPI) StorageRoot(addr common.Address, blockNr *rpc.BlockNumber) (common.Hash, error) + type TraceArgs struct + Timeout *string + Tracer *string