client

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEART_BEAT_TERM = 3 // per min
	REQ_OTPRN_TERM  = 3 // per sec
)
View Source
const (
	Port            = "60002" // service port
	MainnetFairHost = "fairnode.mainnet.anduschain.io"
	TestnetFairHost = "fairnode.testnet.anduschain.io"
)

Variables

View Source
var DefaultConfig = Config{
	FairServerHost: "localhost",
	FairServerPort: "60002",
}

Functions

This section is empty.

Types

type Backend

type Backend interface {
	BlockChain() *core.BlockChain
	TxPool() *core.TxPool
	AccountManager() *accounts.Manager
	Server() *p2p.Server
	Coinbase() common.Address
}

type Config

type Config struct {
	FairServerHost string
	FairServerPort string
}

func (*Config) FairnodeEndpoint

func (c *Config) FairnodeEndpoint(network types.Network) string

type DebClient

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

func NewDebClient

func NewDebClient(config *params.ChainConfig, exitWorker chan struct{}, localIps map[string]string, staticNodes []*discover.Node) *DebClient

func (*DebClient) FnAddress

func (dc *DebClient) FnAddress() common.Address

func (*DebClient) Start

func (dc *DebClient) Start(backend Backend) error

func (*DebClient) Stop

func (dc *DebClient) Stop()

func (*DebClient) SubscribeClientCloseEvent

func (dc *DebClient) SubscribeClientCloseEvent(ch chan<- types.ClientClose) event.Subscription

client process close event

func (*DebClient) SubscribeFairnodeStatusEvent

func (dc *DebClient) SubscribeFairnodeStatusEvent(ch chan<- types.FairnodeStatusEvent) event.Subscription

fairnode process status event

type Miner

type Miner struct {
	Node     proto.HeartBeat
	Miner    accounts.Account
	Accounts *accounts.Manager
}

func (*Miner) Hash

func (m *Miner) Hash() common.Hash

Jump to

Keyboard shortcuts

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