Documentation
¶
Index ¶
- Variables
- func NewMerkleTree(hashes []common.Hash) (*MerkleTreeNode, []*MerkleProof, error)
- func ParseDelegatorStatus(s uint8) (string, error)
- func ParseTranscoderStatus(s uint8) (string, error)
- func VerifyProof(rootHash common.Hash, hash common.Hash, proof *MerkleProof) bool
- type Delegator
- type MerkleProof
- type MerkleTreeNode
- type ProtocolParameters
- type TokenPools
- type Transcoder
- type TranscoderPoolHints
- type UnbondingLock
- type VoteChoice
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownTranscoderStatus = fmt.Errorf("unknown transcoder status") ErrUnknownDelegatorStatus = fmt.Errorf("unknown delegator status") )
View Source
var (
ErrDuplicatedHash = fmt.Errorf("MerkleTree: duplicated hash provided")
)
View Source
var VoteChoices = []VoteChoice{Yes, No}
Functions ¶
func NewMerkleTree ¶
func NewMerkleTree(hashes []common.Hash) (*MerkleTreeNode, []*MerkleProof, error)
func ParseDelegatorStatus ¶ added in v0.5.0
func ParseTranscoderStatus ¶ added in v0.5.0
func VerifyProof ¶
Types ¶
type MerkleProof ¶
func NewMerkleProof ¶
func NewMerkleProof(node *MerkleTreeNode) *MerkleProof
func (*MerkleProof) Bytes ¶
func (p *MerkleProof) Bytes() []byte
type MerkleTreeNode ¶
type MerkleTreeNode struct { Hash common.Hash Parent *MerkleTreeNode LeftSib *MerkleTreeNode RightSib *MerkleTreeNode }
func (*MerkleTreeNode) String ¶
func (n *MerkleTreeNode) String() string
type ProtocolParameters ¶ added in v0.5.0
type ProtocolParameters struct { NumActiveTranscoders *big.Int RoundLength *big.Int RoundLockAmount *big.Int UnbondingPeriod uint64 VerificationRate uint64 VerificationPeriod *big.Int SlashingPeriod *big.Int FailedVerificationSlashAmount *big.Int MissedVerificationSlashAmount *big.Int DoubleClaimSegmentSlashAmount *big.Int FinderFee *big.Int Inflation *big.Int InflationChange *big.Int TargetBondingRate *big.Int VerificationCodeHash string TotalBonded *big.Int TotalSupply *big.Int Paused bool }
type TokenPools ¶ added in v0.5.0
type Transcoder ¶ added in v0.5.0
type TranscoderPoolHints ¶ added in v0.5.10
type UnbondingLock ¶ added in v0.5.0
type VoteChoice ¶ added in v0.5.8
type VoteChoice int
const ( Yes VoteChoice = iota No )
func (VoteChoice) IsValid ¶ added in v0.5.8
func (v VoteChoice) IsValid() bool
func (VoteChoice) String ¶ added in v0.5.8
func (v VoteChoice) String() string
Click to show internal directories.
Click to hide internal directories.