node

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: ISC Imports: 41 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

This section is empty.

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 database.DB
	// 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, database database.DB, 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) Banlist

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

Banlist

func (*PrivateBlockChainAPI) RemoveBan

func (api *PrivateBlockChainAPI) RemoveBan(id *string) (interface{}, error)

RemoveBan

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) GetMeerDAGInfo added in v1.0.18

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

func (*PublicBlockChainAPI) GetNetworkInfo

func (api *PublicBlockChainAPI) GetNetworkInfo() (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) GetAddressApi

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

return address api

func (*QitmeerFull) GetBlockManager

func (qm *QitmeerFull) GetBlockManager() *blkmgr.BlockManager

return block manager

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) GetVMService

func (qm *QitmeerFull) GetVMService() *vm.Service

return vm service

func (*QitmeerFull) RegisterAccountService

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

func (*QitmeerFull) RegisterBlkMgrService

func (qm *QitmeerFull) RegisterBlkMgrService(indexManager blockchain.IndexManager) 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() error

func (*QitmeerFull) RegisterTxManagerService

func (qm *QitmeerFull) RegisterTxManagerService(txIndex *index.TxIndex, addrIndex *index.AddrIndex) error

func (*QitmeerFull) RegisterVMService

func (qm *QitmeerFull) RegisterVMService(tp consensus.TxPool) 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