Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MembershipProof ¶
type MembershipProof struct { // The session index on which the specific key is a member. SessionIndex sc.U32 // Trie nodes of a merkle proof of session membership. TrieNodes sc.Sequence[sc.Sequence[sc.U8]] // The validator count of the session on which the specific key is a member. Validators sc.U32 }
Proof of membership of a specific key in a given session.
func DecodeMembershipProof ¶
func DecodeMembershipProof(buffer *bytes.Buffer) (MembershipProof, error)
func (MembershipProof) Bytes ¶
func (m MembershipProof) Bytes() []byte
func (MembershipProof) Session ¶
func (m MembershipProof) Session() sc.U32
func (MembershipProof) ValidatorCount ¶
func (m MembershipProof) ValidatorCount() sc.U32
type OneSessionHandler ¶
type OneSessionHandler interface { KeyType() primitives.PublicKeyType KeyTypeId() [4]byte DecodeKey(buffer *bytes.Buffer) (primitives.Sr25519PublicKey, error) OnGenesisSession(validators sc.Sequence[primitives.Validator]) error // OnNewSession triggers once the session has changed. OnNewSession(changed bool, validators sc.Sequence[primitives.Validator], queuedValidators sc.Sequence[primitives.Validator]) error // OnBeforeSessionEnding notifies for the end of the session. Triggered before the end of the session. OnBeforeSessionEnding() // OnDisabled triggers hook for a disabled validator. Acts accordingly until a new session begins. OnDisabled(validatorIndex sc.U32) }
Click to show internal directories.
Click to hide internal directories.