malfeasance

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProof

func AddProof(
	db sql.Executor,
	nodeID types.NodeID,
	marriageID *marriage.ID,
	proof []byte,
	domain int,
	received time.Time,
) error

func Count added in v1.7.13

func Count(db sql.Executor) (int, error)

func IsMalicious

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

func IterateOps added in v1.7.10

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

func MarriageProof added in v1.7.11

func MarriageProof(db sql.Executor, marriageID marriage.ID) ([]byte, int, error)

MarriageProof returns the malfeasance proof for the marriage set. Returns sql.ErrNotFound if no proof for the given marriage ID exists. To return a proof for a node ID use NodeIDProof instead.

func NodeIDProof added in v1.7.11

func NodeIDProof(db sql.Executor, nodeID types.NodeID) ([]byte, int, error)

NodeIDProof returns the malfeasance proof and its domain for the given node ID. Returns sql.ErrNotFound if no proof for the given node ID exists. To return a proof for a marriage set use MarriageProof instead.

func SetMalicious

func SetMalicious(db sql.Executor, nodeID types.NodeID, marriageID marriage.ID, received time.Time) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳