Documentation ¶
Index ¶
Constants ¶
View Source
const (
CacheSize = 128
)
Variables ¶
View Source
var ( ErrInvalidStartHeight = errors.New("invalid nr start height") ErrInvalidEndHeight = errors.New("invalid nr end height") ErrInvalidHeightInterval = errors.New("invalid nr height interval") ErrNRNotFound = errors.New("nr not found") ErrNRSummaryNotFound = errors.New("nr summary not found") )
Error types
Functions ¶
This section is empty.
Types ¶
type NR ¶
type NR struct {
// contains filtered or unexported fields
}
func (*NR) GetNRListByHeight ¶
GetNRListByHeight return nr list, which subtract the deplay height, ensure all node is equal.
type NRData ¶
type NRData struct { StartHeight uint64 `json:"start_height,string"` EndHeight uint64 `json:"end_height,string"` Version uint64 `json:"version,string"` Nrs []*NRItem `json:"nrs"` Err string `json:"err"` }
NRData nr data
type NRItem ¶
type NRItem struct { Address string `json:"address"` Median string `json:"median"` Weight string `json:"weight"` Score string `json:"score"` }
NRItem nr item
type NRSummary ¶
type NRSummary struct { StartHeight uint64 `json:"start_height,string"` EndHeight uint64 `json:"end_height,string"` Version uint64 `json:"version,string"` Sum *NRSummaryData `json:"sum"` Err string `json:"err"` }
type NRSummaryData ¶
func (*NRSummaryData) ToBytes ¶
func (n *NRSummaryData) ToBytes() ([]byte, error)
ToBytes serialize data
type Neblet ¶
type Neblet interface { Config() *nebletpb.Config BlockChain() *core.BlockChain }
Click to show internal directories.
Click to hide internal directories.