Documentation
¶
Index ¶
- func CreateDB(ctx *node.ServiceContext, config *Config, name string) (fdb.Database, error)
- type APIBackend
- func (b *APIBackend) APIs() []rpc.API
- func (b *APIBackend) AddPeer(url string) error
- func (b *APIBackend) AddTrustedPeer(url string) error
- func (b *APIBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
- func (b *APIBackend) ChainConfig() *params.ChainConfig
- func (b *APIBackend) ChainDb() fdb.Database
- func (b *APIBackend) CurrentBlock() *types.Block
- func (b *APIBackend) Engine() consensus.IEngine
- func (b *APIBackend) GetAccountManager() (*accountmanager.AccountManager, error)
- func (b *APIBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (b *APIBackend) GetEVM(ctx context.Context, account *accountmanager.AccountManager, ...) (*vm.EVM, func() error, error)
- func (b *APIBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error)
- func (b *APIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
- func (b *APIBackend) GetPoolTransactions() ([]*types.Transaction, error)
- func (b *APIBackend) GetReceipts(ctx context.Context, hash common.Hash) ([]*types.Receipt, error)
- func (b *APIBackend) GetTd(blockHash common.Hash) *big.Int
- func (b *APIBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
- func (b *APIBackend) PeerCount() int
- func (b *APIBackend) Peers() []string
- func (b *APIBackend) RemovePeer(url string) error
- func (b *APIBackend) RemoveTrustedPeer(url string) error
- func (b *APIBackend) SelfNode() string
- func (b *APIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
- func (b *APIBackend) SetGasPrice(gasPrice *big.Int) bool
- func (b *APIBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
- func (b *APIBackend) Stats() (pending int, queued int)
- func (b *APIBackend) SuggestPrice(ctx context.Context) (*big.Int, error)
- func (b *APIBackend) TxPoolContent() (map[common.Name][]*types.Transaction, map[common.Name][]*types.Transaction)
- func (b *APIBackend) Wallet() *wallet.Wallet
- type Config
- type FtService
- func (fs *FtService) APIs() []rpc.API
- func (s *FtService) BlockChain() *blockchain.BlockChain
- func (s *FtService) ChainDb() fdb.Database
- func (s *FtService) Engine() consensus.IEngine
- func (fs *FtService) GasPrice() *big.Int
- func (s *FtService) Protocols() []p2p.Protocol
- func (fs *FtService) SetGasPrice(gasPrice *big.Int) bool
- func (fs *FtService) Start() error
- func (fs *FtService) Stop() error
- func (s *FtService) TxPool() *txpool.TxPool
- func (s *FtService) Wallet() *wallet.Wallet
- type MinerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIBackend ¶
type APIBackend struct {
// contains filtered or unexported fields
}
APIBackend implements ftserviceapi.Backend for full nodes
func (*APIBackend) AddTrustedPeer ¶
func (b *APIBackend) AddTrustedPeer(url string) error
AddTrustedPeer allows a remote node to always connect, even if slots are full
func (*APIBackend) BlockByNumber ¶
func (b *APIBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
func (*APIBackend) ChainConfig ¶
func (b *APIBackend) ChainConfig() *params.ChainConfig
ChainConfig returns the active chain configuration.
func (*APIBackend) ChainDb ¶
func (b *APIBackend) ChainDb() fdb.Database
func (*APIBackend) CurrentBlock ¶
func (b *APIBackend) CurrentBlock() *types.Block
func (*APIBackend) GetAccountManager ¶
func (b *APIBackend) GetAccountManager() (*accountmanager.AccountManager, error)
func (*APIBackend) GetPoolTransaction ¶
func (b *APIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
func (*APIBackend) GetPoolTransactions ¶
func (b *APIBackend) GetPoolTransactions() ([]*types.Transaction, error)
func (*APIBackend) GetReceipts ¶
func (*APIBackend) HeaderByNumber ¶
func (b *APIBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
func (*APIBackend) PeerCount ¶
func (b *APIBackend) PeerCount() int
PeerCount returns the number of connected peers.
func (*APIBackend) RemovePeer ¶
func (b *APIBackend) RemovePeer(url string) error
RemovePeer remove a P2P peer
func (*APIBackend) RemoveTrustedPeer ¶
func (b *APIBackend) RemoveTrustedPeer(url string) error
RemoveTrustedPeer removes a remote node from the trusted peer set, but it does not disconnect it automatically.
func (*APIBackend) SelfNode ¶
func (b *APIBackend) SelfNode() string
SelfNode returns the local node's endpoint information.
func (*APIBackend) SendTx ¶
func (b *APIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
func (*APIBackend) SetGasPrice ¶
func (b *APIBackend) SetGasPrice(gasPrice *big.Int) bool
func (*APIBackend) StateAndHeaderByNumber ¶
func (b *APIBackend) StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*APIBackend) Stats ¶
func (b *APIBackend) Stats() (pending int, queued int)
func (*APIBackend) SuggestPrice ¶
func (*APIBackend) TxPoolContent ¶
func (b *APIBackend) TxPoolContent() (map[common.Name][]*types.Transaction, map[common.Name][]*types.Transaction)
func (*APIBackend) Wallet ¶
func (b *APIBackend) Wallet() *wallet.Wallet
type Config ¶
type Config struct { // The genesis block, which is inserted if the database is empty. // If nil, the main net block is used. Genesis *blockchain.Genesis `toml:",omitempty"` // Database options SkipBcVersionCheck bool `mapstructure:"ftservice-skipvcversioncheck"` DatabaseHandles int `mapstructure:"ftservice-databasehandles"` DatabaseCache int `mapstructure:"ftservice-databasecache"` // Transaction pool options TxPool *txpool.Config // Gas Price Oracle options GasPrice gasprice.Config // miner Miner *MinerConfig CoinBase common.Address MetricsConf *metrics.Config // snapshot Snapshot bool }
Config ftservice config
type FtService ¶
type FtService struct { APIBackend *APIBackend // contains filtered or unexported fields }
FtService implements the fractal service.
func New ¶
func New(ctx *node.ServiceContext, config *Config) (*FtService, error)
New creates a new ftservice object (including the initialisation of the common ftservice object)
func (*FtService) BlockChain ¶
func (s *FtService) BlockChain() *blockchain.BlockChain
Click to show internal directories.
Click to hide internal directories.