filter

package
v0.15.3-patch.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: AGPL-3.0 Imports: 1 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsValidCurrentEpochParticipant = And(
	HasStake(true),
	Not(Ejected),
)

IsValidCurrentEpochParticipant is an identity filter for members of the current epoch in good standing.

View Source
var IsVotingConsensusCommitteeMember = And(
	HasRole(flow.RoleConsensus),
	IsValidCurrentEpochParticipant,
)

IsVotingConsensusCommitteeMember is a identity filter for all members of the consensus committee allowed to vote.

Functions

func And

func And(filters ...flow.IdentityFilter) flow.IdentityFilter

And combines two or more filters that all need to be true.

func Any

func Any(*flow.Identity) bool

Any will always be true.

func Ejected added in v0.12.0

func Ejected(identity *flow.Identity) bool

Ejected is a filter that returns true if the node is ejected.

func HasNodeID

func HasNodeID(nodeIDs ...flow.Identifier) flow.IdentityFilter

HasNodeID returns a filter that returns true for any identity with an ID matching any of the inputs.

func HasRole

func HasRole(roles ...flow.Role) flow.IdentityFilter

HasRole returns a filter for nodes with one of the input roles.

func HasStake

func HasStake(hasStake bool) flow.IdentityFilter

HasStake returns a filter for nodes with non-zero stake.

func In

In returns a filter for identities within the input list. This is equivalent to HasNodeID, but for list-typed inputs.

func Not

Not returns a filter equivalent to the inverse of the input filter.

func Or

func Or(filters ...flow.IdentityFilter) flow.IdentityFilter

Or combines two or more filters and only needs one of them to be true.

Types

This section is empty.

Directories

Path Synopsis
(c) 2021 Dapper Labs - ALL RIGHTS RESERVED
(c) 2021 Dapper Labs - ALL RIGHTS RESERVED

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL