Documentation ¶
Index ¶
- Variables
- func CreateDB(config *Config, name string) (store.Database, error)
- type Config
- type LesServer
- type Plasma
- func (s *Plasma) AddLesServer(ls LesServer)
- func (s *Plasma) BlockChain() *core.BlockChain
- func (s *Plasma) ChainDb() store.Database
- func (s *Plasma) Config() *Config
- func (s *Plasma) Engine() consensus.Engine
- func (s *Plasma) EventMux() *event.TypeMux
- func (s *Plasma) IsListening() bool
- func (s *Plasma) NetVersion() uint64
- func (s *Plasma) Operbase() common.Address
- func (s *Plasma) ProcessRemoteTxs(txs types.Transactions)
- func (s *Plasma) Protocols() []p2p.Protocol
- func (s *Plasma) RootChain() *core.RootChain
- func (s *Plasma) Start(srvr *p2p.Server) error
- func (s *Plasma) StartMining(local bool) error
- func (s *Plasma) Stop() error
- func (s *Plasma) SubscribeNewBlockCh(ch chan *types.Block)
- func (s *Plasma) SubscribeNewTxsCh(ch chan types.Transactions)
- func (s *Plasma) TxPool() *core.TxPool
- func (s *Plasma) WriteBlock(block *types.Block) error
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ SyncMode: downloader.FastSync, NetworkId: 1, LightPeers: 100, DatabaseCache: 768, TrieCache: 256, TrieTimeout: 60 * time.Minute, TxPool: core.DefaultTxPoolConfig, DataDir: "", ChainUrl: "", CxAddr: "", KeystorePath: "", }
DefaultConfig contains default settings for use on the Ethereum main net.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Protocol options NetworkId uint64 // Network ID to use for selecting peers to connect to SyncMode downloader.SyncMode NoPruning bool // Light client options LightServ int `toml:",omitempty"` // Maximum percentage of time allowed for serving LES requests LightPeers int `toml:",omitempty"` // Maximum number of LES client peers // Database options SkipBcVersionCheck bool `toml:"-"` DatabaseHandles int `toml:"-"` DatabaseCache int TrieCache int TrieTimeout time.Duration // Mining-related options Operbase common.Address `toml:",omitempty"` ExtraData []byte `toml:",omitempty"` // Transaction pool options TxPool core.TxPoolConfig // Enables tracking of SHA3 preimages in the VM EnablePreimageRecording bool // Miscellaneous options DocRoot string `toml:"-"` // DataDir is the file system folder the node should use for any data storage // requirements. The configured data directory will not be directly shared with // registered services, instead those can use utility methods to create/access // databases or flat files. This enables ephemeral nodes which can fully reside // in memory. DataDir string ChainUrl string CxAddr string CxAbi string OperPwd string KeystorePath string IsOperator bool }
type Plasma ¶
type Plasma struct {
// contains filtered or unexported fields
}
Plasma implements the Ethereum full node service.
func New ¶
New creates a new Plasma object (including the initialisation of the common Plasma object)
func (*Plasma) AddLesServer ¶
func (*Plasma) BlockChain ¶
func (s *Plasma) BlockChain() *core.BlockChain
func (*Plasma) IsListening ¶
func (*Plasma) NetVersion ¶
func (s *Plasma) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) }
func (*Plasma) ProcessRemoteTxs ¶
func (s *Plasma) ProcessRemoteTxs(txs types.Transactions)
func (*Plasma) Protocols ¶
Protocols implements node.Service, returning all the currently configured network protocols to start.
func (*Plasma) Start ¶
Start implements node.Service, starting all internal goroutines needed by the Plasma protocol implementation.
func (*Plasma) StartMining ¶
func (*Plasma) Stop ¶
Stop implements node.Service, terminating all internal goroutines used by the Plasma protocol.
func (*Plasma) SubscribeNewBlockCh ¶
func (*Plasma) SubscribeNewTxsCh ¶
func (s *Plasma) SubscribeNewTxsCh(ch chan types.Transactions)
Click to show internal directories.
Click to hide internal directories.