Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochVoteSubmissions ¶
type EpochVoteSubmissions struct { TotalSubmissionWeight abi.TokenAmount MostVotedKey []byte Submitters cid.Cid // TCid<THamt<Address, ()>> SubmissionWeights cid.Cid // TCid<THamt<UniqueBytesKey, TokenAmount>> Submissions cid.Cid // TCid<THamt<UniqueBytesKey, T>> }
EpochVoteSubmissions tracks all the vote submissions of an epoch for a checkpoint voting.
func (*EpochVoteSubmissions) MarshalCBOR ¶
func (t *EpochVoteSubmissions) MarshalCBOR(w io.Writer) error
func (*EpochVoteSubmissions) UnmarshalCBOR ¶
func (t *EpochVoteSubmissions) UnmarshalCBOR(r io.Reader) (err error)
type Voting ¶
type Voting struct { GenesisEpoch abi.ChainEpoch SubmissionPeriod abi.ChainEpoch LastVotingExecuted abi.ChainEpoch ExecutableEpochQueue []abi.ChainEpoch //Option<BTreeSet<ChainEpoch>> EpochVoteSubmission cid.Cid //TCid<THamt<ChainEpoch, EpochVoteSubmissions<T>>> Ratio Ratio }
Voting is the Go implementation of the Voting<T> struct from Rust ipc-actors
func NewWithRatio ¶
func (*Voting) ValidatorHasVoted ¶
func (v *Voting) ValidatorHasVoted(s adt.Store, epoch abi.ChainEpoch, validator address.Address) (bool, error)
ValidatorHasVoted checks if a validator has already voted for a checkpoint.
This function expects the ID (f0 address) of the validator address, which is the one used to index validators in the actor state. f1 and f3 addresses will have to be translated to f0 addresses before using this function.
Click to show internal directories.
Click to hide internal directories.