Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPolicy ¶
type DefaultPolicy struct{}
func (*DefaultPolicy) Logs ¶
func (dp *DefaultPolicy) Logs() []Log
func (*DefaultPolicy) ShardHint ¶
func (dp *DefaultPolicy) ShardHint() uint64
ShardHint returns the smallest shard hint that all logs accept
func (*DefaultPolicy) Verify ¶
func (dp *DefaultPolicy) Verify(*types.CosignedTreeHead) error
Verify checks if the cosigned tree head satisifies the policy "one log and a majority of witnesses". Any unverifiable cosignatures are removed.
func (*DefaultPolicy) Witnesses ¶
func (dp *DefaultPolicy) Witnesses() []Witness
type Log ¶
type Policy ¶
type Policy interface { // Logs returns the list of known logs. It is needed so that an // appropriate log can be picked when submitting a signed checksum. Logs() []Log // ShardHint returns a recommended shard hint. ShardHint() uint64 // Verify checks if a cosigned tree head is trustworthy. On success, // any invalid or unknown cosignatures may be removed. Verify(*types.CosignedTreeHead) error }
Click to show internal directories.
Click to hide internal directories.