probe

package
v1.2.0-pre-fork6-fix3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: LGPL-3.0 Imports: 13 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 BlockProbe added in v1.2.0

type BlockProbe struct {
	Height uint32 `json:"height"`
	Round  uint32 `json:"round"`
	Type   string `json:"type"`
}

type ChainProbe added in v1.2.0

type ChainProbe struct {
	BestBlock       *Block `json:"bestBlock"`
	BestQC          *QC    `json:"bestQC"`
	BestQCCandidate *QC    `json:"bestQCCandidate"`
}

type Network

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

type PacemakerProbe added in v1.2.0

type PacemakerProbe struct {
	Mode             string `json:"mode"`
	StartHeight      uint32 `json:"startHeight"`
	StartRound       uint32 `json:"startRound"`
	CurRound         uint32 `json:"curRound"`
	MyCommitteeIndex int    `json:"myCommitteeIndex"`

	LastVotingHeight uint32 `json:"lastVotingHeight"`
	LastOnBeatRound  uint32 `json:"lastOnBeatRound"`
	ProposalCount    int    `json:"proposalCount"`
	PendingCount     int    `json:"pendingCount"`
	PendingLowest    uint32 `json:"pendingLowest"`

	QCHigh        *QC         `json:"qcHigh"`
	BlockExecuted *BlockProbe `json:"blockExecuted"`
	BlockLocked   *BlockProbe `json:"blockLocked"`
	BlockLeaf     *BlockProbe `json:"blockLeaf"`
}

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 PowProbe added in v1.2.0

type PowProbe struct {
	Status       string `json:"status"`
	LatestHeight uint32 `json:"latestHeight"`
	KFrameHeight uint32 `json:"kframeHeight"`
	PoolSize     int    `json:"poolSize"`
}

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) HandleReplay added in v1.2.0

func (p *Probe) HandleReplay(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"`

	DelegatesSource    string `json:"delegatesSource"`
	IsCommitteeMember  bool   `json:"isCommitteeMember"`
	IsPacemakerRunning bool   `json:"isPacemakerRunning"`
	InDelegateList     bool   `json:"inDelegateList"`

	BestQC    uint32 `json:"bestQC"`
	BestBlock uint32 `json:"bestBlock"`

	Pacemaker *PacemakerProbe `json:"pacemaker"`
	Chain     *ChainProbe     `json:"chain"`
	Pow       *PowProbe       `json:"pow"`
}

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