Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpinionHasher ¶
type OpinionHasher struct {
// contains filtered or unexported fields
}
OpinionHasher is a utility for computing opinion hash.
func (*OpinionHasher) Hash ¶
func (h *OpinionHasher) Hash() (rst types.Hash32)
Hash instantiates 32bytes and write hash.Sum to it.
func (*OpinionHasher) Sum ¶
func (h *OpinionHasher) Sum(dst []byte) []byte
Sum appends hash sum to dst.
func (*OpinionHasher) WriteAbstain ¶
func (h *OpinionHasher) WriteAbstain()
WriteAbstain writes abstain sentinel as an opinion.
func (*OpinionHasher) WritePrevious ¶
func (h *OpinionHasher) WritePrevious(hash types.Hash32)
WritePrevious aggregated hash.
func (*OpinionHasher) WriteSupport ¶
func (h *OpinionHasher) WriteSupport(id types.BlockID, height uint64)
WriteSupport writes id and height of the block.
Click to show internal directories.
Click to hide internal directories.