probe

package
v0.0.0-...-71e40f4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Number           uint32        `json:"number"`
	ID               meter.Bytes32 `json:"id"`
	ParentID         meter.Bytes32 `json:"parentID"`
	BlockType        string        `json:"blockType"`
	QC               *QC           `json:"qc"`
	Timestamp        uint64        `json:"timestamp"`
	TxCount          int           `json:"txCount"`
	LastKBlockHeight uint32        `json:"lastKBlockHeight"`
	HasCommitteeInfo bool          `json:"hasCommitteeInfo"`
	Nonce            uint64        `json:"nonce"`
}

Block block

type Network

type Network interface {
	PeersStats() []*comm.PeerStats
}

type PeerStats

type PeerStats struct {
	Name        string        `json:"name"`
	BestBlockID meter.Bytes32 `json:"bestBlockID"`
	TotalScore  uint64        `json:"totalScore"`
	PeerID      string        `json:"peerID"`
	NetAddr     string        `json:"netAddr"`
	Inbound     bool          `json:"inbound"`
	Duration    uint64        `json:"duration"`
}

func ConvertPeersStats

func ConvertPeersStats(ss []*comm.PeerStats) []*PeerStats

type Probe

type Probe struct {
	Cons          *consensus.ConsensusReactor
	ComplexPubkey string
	Chain         *chain.Chain
	Version       string
	Network       Network
}

func (*Probe) HandlePeers

func (p *Probe) HandlePeers(w http.ResponseWriter, r *http.Request)

func (*Probe) HandleProbe

func (p *Probe) HandleProbe(w http.ResponseWriter, r *http.Request)

func (*Probe) HandlePubkey

func (p *Probe) HandlePubkey(w http.ResponseWriter, r *http.Request)

func (*Probe) HandleVersion

func (p *Probe) HandleVersion(w http.ResponseWriter, r *http.Request)

type ProbeResult

type ProbeResult struct {
	Name            string `json:"name"`
	PubKey          string `json:"pubkey"`
	PubKeyValid     bool   `json:"pubkeyValid"`
	Version         string `json:"version"`
	BestBlock       *Block `json:"bestBlock"`
	BestQC          *QC    `json:"bestQC"`
	BestQCCandidate *QC    `json:"bestQCCandidate"`
	QCHigh          *QC    `json:"qcHigh"`

	IsCommitteeMember  bool `json:"isCommitteeMember"`
	IsPacemakerRunning bool `json:"isPacemakerRunning"`
}

type QC

type QC struct {
	Height  uint32 `json:"qcHeight"`
	Round   uint32 `json:"qcRound"`
	EpochID uint64 `json:"epochID"`
}

Jump to

Keyboard shortcuts

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