Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptorVerifier ¶
type AcceptorVerifier interface {
VerifyAcceptor(rec *consensusproto.RawRecord) (err error)
ShouldValidate() bool
}
type RecordVerifier ¶
type RecordVerifier = AcceptorVerifier
func New ¶
func New(networkKey crypto.PubKey) RecordVerifier
New returns a RecordVerifier that accepts only records whose AcceptorIdentity equals networkKey — the Ed25519 root key of the network (the pubkey encoded by nodeconf.Configuration().NetworkId; decode via crypto.DecodeNetworkId). Records signed by any other key — even with a well-formed Ed25519 signature — are rejected.
func NewValidateFull ¶
func NewValidateFull() RecordVerifier
type ValidateFull ¶
type ValidateFull struct{}
func (*ValidateFull) ShouldValidate ¶
func (a *ValidateFull) ShouldValidate() bool
func (*ValidateFull) VerifyAcceptor ¶
func (a *ValidateFull) VerifyAcceptor(_ *consensusproto.RawRecord) error
Click to show internal directories.
Click to hide internal directories.