Documentation ¶
Overview ¶
Package verify supports verification that the downloaded contents match the root hash commitment made in a log checkpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeafHashFn ¶
LeafHashFn returns the leaf hash (commitment) to the given preimage at the given log index.
type LogVerifier ¶
type LogVerifier struct {
// contains filtered or unexported fields
}
LogVerifier calculates the Merkle root of a log.
func NewLogVerifier ¶
func NewLogVerifier(db *logdb.Database, lh LeafHashFn, ih compact.HashFn) LogVerifier
NewLogVerifier returns a LogVerifier which obtains raw leaves from `db`, and uses the given hash functions to construct a merkle tree.
func (LogVerifier) MerkleRoot ¶
MerkleRoot calculates the Merkle root hash of its log at the given size.
Click to show internal directories.
Click to hide internal directories.