validator

package
v0.0.0-...-77dcbbd Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package validator implements utility functions regarding BFT validators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeValidatorsHash

func ComputeValidatorsHash(validators []HashValidator, certificateThreshold uint64) ([]byte, error)

func NewHashValidator

func NewHashValidator(blsKey []byte, bftWeight uint64) *hashValidator

Types

type BlockSlot

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

func NewBlockSlot

func NewBlockSlot(genesisTimestamp, blockTime uint32) *BlockSlot

func (*BlockSlot) GetSlotNumber

func (a *BlockSlot) GetSlotNumber(unixTime uint32) int

func (*BlockSlot) GetSlotTime

func (a *BlockSlot) GetSlotTime(slot int) uint32

type HashValidator

type HashValidator interface {
	BLSKey() codec.Hex
	BFTWeight() uint64
}

type HashValidators

type HashValidators []HashValidator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳