node

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: ISC Imports: 49 Imported by: 0

Documentation

Overview

Copyright (c) 2017-2018 The qitmeer developers Copyright (c) 2013-2016 The btcsuite developers Copyright (c) 2017-2018 The Decred developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.

Copyright (c) 2017-2018 The qitmeer developers

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeStopped = errors.New("node not started")
	ErrDatadirUsed = errors.New("datadir already used by another process")
	ErrNodeNoDB    = errors.New("node not database")
)

Functions

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type Node

type Node struct {
	service.Service

	// config
	Config *config.Config
	Params *params.Params

	// database layer
	DB model.DataBase
	// contains filtered or unexported fields
}

Node works as a server container for all service can be registered. such as p2p, rpc, ws etc.

func NewNode

func NewNode(cfg *config.Config, chainParams *params.Params, interrupt <-chan struct{}) (*Node, error)

func (*Node) GetQitmeerFull

func (n *Node) GetQitmeerFull() *QitmeerFull

return qitmeer full

func (*Node) RegisterService

func (n *Node) RegisterService() error

func (*Node) Start

func (n *Node) Start() error

func (*Node) Stop

func (n *Node) Stop() error

type PrivateBlockChainAPI

type PrivateBlockChainAPI struct {
	// contains filtered or unexported fields
}

func NewPrivateBlockChainAPI

func NewPrivateBlockChainAPI(node *QitmeerFull) *PrivateBlockChainAPI

func (*PrivateBlockChainAPI) GetConfig added in v1.2.0

func (api *PrivateBlockChainAPI) GetConfig() (interface{}, error)

func (*PrivateBlockChainAPI) SetRpcMaxClients

func (api *PrivateBlockChainAPI) SetRpcMaxClients(max int) (interface{}, error)

SetRpcMaxClients

func (*PrivateBlockChainAPI) Stop

func (api *PrivateBlockChainAPI) Stop() (interface{}, error)

Stop the node

type PrivateLogAPI

type PrivateLogAPI struct {
	// contains filtered or unexported fields
}

func NewPrivateLogAPI

func NewPrivateLogAPI(node *QitmeerFull) *PrivateLogAPI

func (*PrivateLogAPI) SetLogLevel

func (api *PrivateLogAPI) SetLogLevel(level string) (interface{}, error)

set log

type PublicBlockChainAPI

type PublicBlockChainAPI struct {
	// contains filtered or unexported fields
}

func NewPublicBlockChainAPI

func NewPublicBlockChainAPI(node *QitmeerFull) *PublicBlockChainAPI

func (*PublicBlockChainAPI) GetChainInfo added in v1.2.0

func (api *PublicBlockChainAPI) GetChainInfo(lastCount int, start *int64, end *int64) (interface{}, error)

func (*PublicBlockChainAPI) GetDatabaseInfo added in v1.2.0

func (api *PublicBlockChainAPI) GetDatabaseInfo() (interface{}, error)

func (*PublicBlockChainAPI) GetMeerDAGInfo added in v1.0.18

func (api *PublicBlockChainAPI) GetMeerDAGInfo() (interface{}, error)

func (*PublicBlockChainAPI) GetNodeInfo

func (api *PublicBlockChainAPI) GetNodeInfo() (interface{}, error)

Return the node info

func (*PublicBlockChainAPI) GetRpcInfo

func (api *PublicBlockChainAPI) GetRpcInfo() (interface{}, error)

Return the RPC info

func (*PublicBlockChainAPI) GetRpcModules

func (api *PublicBlockChainAPI) GetRpcModules() (interface{}, error)

func (*PublicBlockChainAPI) GetSubsidy

func (api *PublicBlockChainAPI) GetSubsidy() (interface{}, error)

func (*PublicBlockChainAPI) GetTimeInfo

func (api *PublicBlockChainAPI) GetTimeInfo() (interface{}, error)

type QitmeerFull

type QitmeerFull struct {
	service.Service
	// contains filtered or unexported fields
}

QitmeerFull implements the qitmeer full node service.

func (*QitmeerFull) APIs

func (qm *QitmeerFull) APIs() []api.API

func (*QitmeerFull) GetAccountManager added in v1.2.0

func (qm *QitmeerFull) GetAccountManager() *acct.AccountManager

func (*QitmeerFull) GetAddressApi

func (qm *QitmeerFull) GetAddressApi() *address.AddressApi

return address api

func (*QitmeerFull) GetBlockChain added in v1.0.19

func (qm *QitmeerFull) GetBlockChain() *blockchain.BlockChain

func (*QitmeerFull) GetMiner

func (qm *QitmeerFull) GetMiner() *miner.Miner

func (*QitmeerFull) GetPeerServer

func (qm *QitmeerFull) GetPeerServer() *p2p.Service

return peer server

func (*QitmeerFull) GetRpcServer

func (qm *QitmeerFull) GetRpcServer() *rpc.RpcServer

func (*QitmeerFull) GetTxManager

func (qm *QitmeerFull) GetTxManager() *tx.TxManager

func (*QitmeerFull) GetWalletManager added in v1.2.0

func (qm *QitmeerFull) GetWalletManager() *wallet.WalletManager

func (*QitmeerFull) RegisterAccountService

func (qm *QitmeerFull) RegisterAccountService(cfg *config.Config) error

func (*QitmeerFull) RegisterAmana added in v1.0.20

func (qm *QitmeerFull) RegisterAmana() error

func (*QitmeerFull) RegisterMinerService

func (qm *QitmeerFull) RegisterMinerService() error

func (*QitmeerFull) RegisterNotifyMgr

func (qm *QitmeerFull) RegisterNotifyMgr() error

func (*QitmeerFull) RegisterP2PService

func (qm *QitmeerFull) RegisterP2PService() error

func (*QitmeerFull) RegisterRpcService

func (qm *QitmeerFull) RegisterRpcService() ([]api.API, error)

func (*QitmeerFull) RegisterTxManagerService

func (qm *QitmeerFull) RegisterTxManagerService() error

func (*QitmeerFull) RegisterWalletService added in v1.2.0

func (qm *QitmeerFull) RegisterWalletService(cfg *config.Config) error

type QitmeerLight

type QitmeerLight struct {
	service.Service
	// contains filtered or unexported fields
}

QitmeerLight implements the qitmeer light node service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL