identities

package
v1.7.5-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMalicious added in v1.7.5

func AllMalicious(db sql.Executor) ([]types.NodeID, error)

AllMalicious retrieves malicious node IDs from the database.

func GetBlobSizes added in v1.4.1

func GetBlobSizes(db sql.Executor, ids [][]byte) (sizes []int, err error)

GetBlobSizes returns the sizes of the blobs corresponding to malfeasance proofs for the specified identities. For non-existent proofs, the corresponding items are set to -1.

func IsMalicious

func IsMalicious(db sql.Executor, nodeID types.NodeID) (bool, error)

IsMalicious returns true if identity is known to be malicious.

func IterateOps added in v1.7.5

func IterateOps(
	db sql.Executor,
	operations builder.Operations,
	fn func(types.NodeID, []byte, time.Time) bool,
) error

func LoadMalfeasanceBlob added in v1.4.1

func LoadMalfeasanceBlob(_ context.Context, db sql.Executor, nodeID []byte, blob *sql.Blob) error

LoadMalfeasanceBlob returns the malfeasance proof in raw bytes for the given identity.

func SetMalicious

func SetMalicious(db sql.Executor, nodeID types.NodeID, proof []byte, received time.Time) error

SetMalicious records identity as malicious.

Types

This section is empty.

Jump to

Keyboard shortcuts

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