Versions in this module Expand all Collapse all v3 v3.3.5 May 9, 2020 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 NewBlockHashesMsg + const NewBlockMsg + const NodeDataMsg + const ProtocolMaxMsgSize + const ReceiptsMsg + const StatusMsg + const TxMsg + var DefaultConfig = Config + var ProtocolLengths = []uint64 + var ProtocolName = "eth" + var ProtocolVersions = []uint + func CreateDB(ctx *node.ServiceContext, config *Config, name string) (common.Database, error) + func NewBloomIndexer(db common.Database, size uint64) *core.ChainIndexer + type BadBlockArgs struct + Block map[string]interface{} + Hash common.Hash + RLP string + type BloomIndexer struct + func (b *BloomIndexer) Commit() error + func (b *BloomIndexer) Process(header *types.Header) + func (b *BloomIndexer) Reset(section uint64, lastSectionHead common.Hash) error + type Config struct + ConstantinopleOverride *big.Int + DatabaseCache int + DatabaseHandles int + DocRoot string + EVMInterpreter string + EWASMInterpreter string + EnablePreimageRecording bool + Etherbase common.Address + GPO gasprice.Config + Genesis *core.Genesis + LightPeers int + LightServ int + MinerExtraData []byte + MinerGasCeil uint64 + MinerGasFloor uint64 + MinerGasPrice *big.Int + MinerNotify []string + MinerNoverify bool + MinerRecommit time.Duration + NetworkId uint64 + NoPruning bool + SkipBcVersionCheck bool + SyncMode downloader.SyncMode + TrieCache int + TrieTimeout time.Duration + TxPool core.TxPoolConfig + func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error + func (c Config) MarshalTOML() (interface{}, 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) BloomStatus() (uint64, uint64) + func (b *EthApiBackend) ChainConfig() *params.ChainConfig + func (b *EthApiBackend) ChainDb() common.Database + func (b *EthApiBackend) CurrentBlock() *types.Block + func (b *EthApiBackend) Downloader() *downloader.Downloader + func (b *EthApiBackend) GenesisAlloc() core.GenesisAlloc + func (b *EthApiBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error) + func (b *EthApiBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, error) + func (b *EthApiBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, 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, hash common.Hash) (types.Receipts, error) + func (b *EthApiBackend) GetTd(blockHash common.Hash) *big.Int + func (b *EthApiBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) + func (b *EthApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error) + func (b *EthApiBackend) InitialSupply() *big.Int + func (b *EthApiBackend) ProtocolVersion() int + func (b *EthApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (b *EthApiBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) + func (b *EthApiBackend) SetHead(number uint64) + func (b *EthApiBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error) + func (b *EthApiBackend) Stats() (pending int, queued int) + func (b *EthApiBackend) SubscribeChainEvent(ch chan<- core.ChainEvent, name string) + func (b *EthApiBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent, name string) + func (b *EthApiBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent, name string) + func (b *EthApiBackend) SubscribeLogsEvent(ch chan<- []*types.Log, name string) + func (b *EthApiBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent, name string) + func (b *EthApiBackend) SubscribePendingLogsEvent(ch chan<- core.PendingLogsEvent, name string) + func (b *EthApiBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent, name string) + func (b *EthApiBackend) SuggestPrice(ctx context.Context) (*big.Int, error) + func (b *EthApiBackend) TxPoolContent(ctx context.Context) (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + func (b *EthApiBackend) UnsubscribeChainEvent(ch chan<- core.ChainEvent) + func (b *EthApiBackend) UnsubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) + func (b *EthApiBackend) UnsubscribeChainSideEvent(ch chan<- core.ChainSideEvent) + func (b *EthApiBackend) UnsubscribeLogsEvent(ch chan<- []*types.Log) + func (b *EthApiBackend) UnsubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) + func (b *EthApiBackend) UnsubscribePendingLogsEvent(ch chan<- core.PendingLogsEvent) + func (b *EthApiBackend) UnsubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) + type GoChain struct + ApiBackend *EthApiBackend + func New(sctx *node.ServiceContext, config *Config) (*GoChain, error) + func (gc *GoChain) APIs() []rpc.API + func (gc *GoChain) AccountManager() *accounts.Manager + func (gc *GoChain) AddLesServer(ls LesServer) + func (gc *GoChain) BlockChain() *core.BlockChain + func (gc *GoChain) ChainDb() common.Database + func (gc *GoChain) Downloader() *downloader.Downloader + func (gc *GoChain) Engine() consensus.Engine + func (gc *GoChain) EthVersion() int + func (gc *GoChain) Etherbase() (eb common.Address, err error) + func (gc *GoChain) EventMux() *core.InterfaceFeed + func (gc *GoChain) IsListening() bool + func (gc *GoChain) IsMining() bool + func (gc *GoChain) Miner() *miner.Miner + func (gc *GoChain) NetVersion() uint64 + func (gc *GoChain) Protocols() []p2p.Protocol + func (gc *GoChain) ResetWithGenesisBlock(gb *types.Block) + func (gc *GoChain) SetEtherbase(etherbase common.Address) + func (gc *GoChain) Start(srvr *p2p.Server) error + func (gc *GoChain) StartMining(threads int) error + func (gc *GoChain) Stop() error + func (gc *GoChain) StopMining() + func (gc *GoChain) TxPool() *core.TxPool + type LesServer interface + Protocols func() []p2p.Protocol + SetBloomBitsIndexer func(bbIndexer *core.ChainIndexer) + Start func(srvr *p2p.Server) + Stop func() + type NodeInfo struct + Config *params.ChainConfig + Difficulty *big.Int + Genesis common.Hash + Head common.Hash + Network uint64 + type PeerInfo struct + Difficulty *big.Int + Head string + Version int + type PrivateAdminAPI struct + func NewPrivateAdminAPI(eth *GoChain) *PrivateAdminAPI + func (api *PrivateAdminAPI) ExportChain(file string) (bool, error) + func (api *PrivateAdminAPI) ImportChain(ctx context.Context, file string) (bool, error) + type PrivateDebugAPI struct + func NewPrivateDebugAPI(config *params.ChainConfig, eth *GoChain) *PrivateDebugAPI + func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]*BadBlockArgs, error) + func (api *PrivateDebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([]common.Address, error) + func (api *PrivateDebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([]common.Address, error) + func (api *PrivateDebugAPI) Preimage(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) + func (api *PrivateDebugAPI) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex int, ...) (StorageRangeResult, error) + func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob []byte, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockByHash(ctx context.Context, hash common.Hash, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([]*txTraceResult, error) + func (api *PrivateDebugAPI) TraceChain(ctx context.Context, start, end rpc.BlockNumber, config *TraceConfig) (*rpc.Subscription, error) + func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) + type PrivateMinerAPI struct + func NewPrivateMinerAPI(e *GoChain) *PrivateMinerAPI + func (api *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool + func (api *PrivateMinerAPI) SetExtra(extra string) (bool, error) + func (api *PrivateMinerAPI) SetGasPrice(ctx context.Context, gasPrice hexutil.Big) bool + func (api *PrivateMinerAPI) SetRecommitInterval(interval int) + func (api *PrivateMinerAPI) Start(threads *int) error + func (api *PrivateMinerAPI) Stop() + type ProtocolManager struct + SubProtocols []p2p.Protocol + func NewProtocolManager(config *params.ChainConfig, mode downloader.SyncMode, networkId uint64, ...) (*ProtocolManager, error) + func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) + func (pm *ProtocolManager) BroadcastTxs(txs types.Transactions) + func (pm *ProtocolManager) NodeInfo() *NodeInfo + func (pm *ProtocolManager) Start(maxPeers int) + func (pm *ProtocolManager) Stop() + type PublicDebugAPI struct + func NewPublicDebugAPI(eth *GoChain) *PublicDebugAPI + func (api *PublicDebugAPI) DumpBlock(ctx context.Context, blockNr rpc.BlockNumber) (state.Dump, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(e *GoChain) *PublicEthereumAPI + func (api *PublicEthereumAPI) ChainId() hexutil.Uint64 + func (api *PublicEthereumAPI) Coinbase() (common.Address, error) + func (api *PublicEthereumAPI) Etherbase() (common.Address, error) + type PublicMinerAPI struct + func NewPublicMinerAPI(e *GoChain) *PublicMinerAPI + func (api *PublicMinerAPI) Mining() bool + type StorageRangeResult struct + NextKey *common.Hash + Storage storageMap + type TraceConfig struct + Reexec *uint64 + Timeout *string + Tracer *string Other modules containing this package github.com/beyonderyue/gochain