Documentation ¶
Index ¶
- func EquivocationSet(db sql.Executor, id types.NodeID) ([]types.NodeID, error)
- func EquivocationSetByMarriageATX(db sql.Executor, atx types.ATXID) ([]types.NodeID, error)
- func GetBlobSizes(db sql.Executor, ids [][]byte) (sizes []int, err error)
- func GetMalfeasanceProof(db sql.Executor, nodeID types.NodeID) (*wire.MalfeasanceProof, error)
- func GetMalicious(db sql.Executor) (nids []types.NodeID, err error)
- func IsMalicious(db sql.Executor, nodeID types.NodeID) (bool, error)
- func IterateMalicious(db sql.Executor, callback func(total int, id types.NodeID) error) error
- func IterateMarriages(db sql.Executor, cb func(id types.NodeID, data *MarriageData) bool) error
- func LoadMalfeasanceBlob(ctx context.Context, db sql.Executor, nodeID []byte, blob *sql.Blob) error
- func MarriageATX(db sql.Executor, id types.NodeID) (types.ATXID, error)
- func SetMalicious(db sql.Executor, nodeID types.NodeID, proof []byte, received time.Time) error
- func SetMarriage(db sql.Executor, id types.NodeID, m *MarriageData) error
- type MarriageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EquivocationSet ¶ added in v1.6.1
EquivocationSet returns all node IDs that are married to the given node ID including itself.
func EquivocationSetByMarriageATX ¶ added in v1.7.0
func GetBlobSizes ¶ added in v1.4.1
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 GetMalfeasanceProof ¶
GetMalfeasanceProof returns the malfeasance proof for the given identity.
func GetMalicious ¶
GetMalicious retrieves malicious node IDs from the database.
func IsMalicious ¶
IsMalicious returns true if identity is known to be malicious.
func IterateMalicious ¶ added in v1.4.1
IterateMalicious invokes the specified callback for each malicious node ID. It stops if the callback returns an error.
func IterateMarriages ¶ added in v1.7.0
func LoadMalfeasanceBlob ¶ added in v1.4.1
LoadMalfeasanceBlob returns the malfeasance proof in raw bytes for the given identity.
func MarriageATX ¶ added in v1.7.0
MarriageATX obtains the marriage ATX for given ID.
func SetMalicious ¶
SetMalicious records identity as malicious.
func SetMarriage ¶ added in v1.6.1
Set marriage inserts marriage data for given identity. If identitty doesn't exist - create it.