Documentation ¶
Index ¶
- func UseLogger(logger l.Logger)
- type Factory
- type PublicVMAPI
- type Service
- func (s *Service) APIs() []api.API
- func (s *Service) AddTxToMempool(tx *types.Transaction, local bool) (int64, error)
- func (s *Service) BlockChain() *core.BlockChain
- func (s *Service) ChainDatabase() ethdb.Database
- func (s *Service) CheckConnectBlock(block *types.SerializedBlock) error
- func (s *Service) ConnectBlock(block *types.SerializedBlock) (uint64, error)
- func (s *Service) DisconnectBlock(block *types.SerializedBlock) (uint64, error)
- func (s *Service) Genesis(txs []*types.Tx) *hash.Hash
- func (s *Service) GetBalance(addr string) (int64, error)
- func (s *Service) GetBlockByNumber(num uint64) (interface{}, error)
- func (s *Service) GetBlockIDByTxHash(txhash *hash.Hash) uint64
- func (s *Service) GetCurHeader() *etypes.Header
- func (s *Service) GetCurStateRoot() common.Hash
- func (s *Service) GetMempoolSize() int64
- func (s *Service) GetTxsFromMempool() ([]*types.Transaction, []*hash.Hash, error)
- func (s *Service) GetVM(id string) (consensus.ChainVM, error)
- func (s *Service) HasTx(h *hash.Hash) bool
- func (s *Service) HasVM(id string) bool
- func (s *Service) PrepareEnvironment(state model.BlockState) (*etypes.Header, error)
- func (s *Service) Register(cvm consensus.ChainVM) error
- func (s *Service) RegisterAPIs(apis []api.API)
- func (s *Service) RemoveTxFromMempool(tx *types.Transaction) error
- func (s *Service) ResetTemplate() error
- func (s *Service) RewindTo(state model.BlockState) error
- func (s *Service) SetLogLevel(level string)
- func (s *Service) SetNotify(Notify consensus.Notify)
- func (s *Service) SetTxPool(tp model.TxPool)
- func (s *Service) Start() error
- func (s *Service) Stop() error
- func (s *Service) VerifyTx(tx model.Tx) (int64, error)
- func (s *Service) VerifyTxSanity(tx model.Tx) error
- func (s *Service) Versions() (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PublicVMAPI ¶
type PublicVMAPI struct {
// contains filtered or unexported fields
}
func NewPublicVMAPI ¶
func NewPublicVMAPI(s *Service) *PublicVMAPI
func (*PublicVMAPI) GetVMsInfo ¶
func (api *PublicVMAPI) GetVMsInfo() (interface{}, error)
type Service ¶
func (*Service) AddTxToMempool ¶
func (*Service) BlockChain ¶ added in v1.0.21
func (s *Service) BlockChain() *core.BlockChain
func (*Service) ChainDatabase ¶ added in v1.0.21
func (*Service) CheckConnectBlock ¶
func (s *Service) CheckConnectBlock(block *types.SerializedBlock) error
func (*Service) ConnectBlock ¶
func (s *Service) ConnectBlock(block *types.SerializedBlock) (uint64, error)
func (*Service) DisconnectBlock ¶
func (s *Service) DisconnectBlock(block *types.SerializedBlock) (uint64, error)
func (*Service) GetBalance ¶ added in v1.0.19
func (*Service) GetBlockByNumber ¶ added in v1.0.20
func (*Service) GetBlockIDByTxHash ¶ added in v1.0.19
func (*Service) GetCurHeader ¶ added in v1.0.21
func (*Service) GetCurStateRoot ¶ added in v1.0.21
func (*Service) GetMempoolSize ¶
func (*Service) GetTxsFromMempool ¶
func (*Service) PrepareEnvironment ¶ added in v1.0.21
func (*Service) RegisterAPIs ¶
func (*Service) RemoveTxFromMempool ¶
func (s *Service) RemoveTxFromMempool(tx *types.Transaction) error
func (*Service) ResetTemplate ¶
func (*Service) RewindTo ¶ added in v1.0.21
func (s *Service) RewindTo(state model.BlockState) error
func (*Service) SetLogLevel ¶
Click to show internal directories.
Click to hide internal directories.