Documentation ¶
Overview ¶
Package proposals defines an implementation of a double-propose detector in the slasher runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProposeDetector ¶
type ProposeDetector struct {
// contains filtered or unexported fields
}
ProposeDetector defines a struct which can detect slashable block proposals.
func NewProposeDetector ¶
func NewProposeDetector(db db.Database) *ProposeDetector
NewProposeDetector creates a new instance of a struct.
func (*ProposeDetector) DetectDoublePropose ¶
func (d *ProposeDetector) DetectDoublePropose( ctx context.Context, incomingBlk *ethpb.SignedBeaconBlockHeader, ) (*ethpb.ProposerSlashing, error)
DetectDoublePropose detects double proposals given a block by looking in the db.
func (*ProposeDetector) DetectDoubleProposeNoUpdate ¶ added in v1.0.0
func (d *ProposeDetector) DetectDoubleProposeNoUpdate( ctx context.Context, incomingBlk *ethpb.BeaconBlockHeader, ) (bool, error)
DetectDoubleProposeNoUpdate detects double proposals for a given block header by db search without storing the incoming block to db.
Click to show internal directories.
Click to hide internal directories.