Documentation ¶
Overview ¶
Package chunk provides a heap of chunks so that larger in-order chunks can be processed more easily, e.g., for verifying ranged inclusion proofs and batching file writes. For how to implement the heap interface, see: https://pkg.go.dev/container/heap#Interface
Idea to use a heap from: https://github.com/aarongable/ctaudit
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct { Start int64 // index of first leaf in this chunk LeafHashes [][sha256.Size]byte // in-order leaf hashes in this chunk SANs []string // sans of all leaves in this chunk Notes []string // notes about this chunk, e.g., errors }
Chunk holds the SANs of a consecutive range of downloaded leaves. The start index and associated leaf hashes are included so that they can be verified.
type ChunkHeap ¶
type ChunkHeap []*Chunk
ChunkHeap is a min-heap of chunks wrt. to start indices. Use TPush() and TPop() to to push/pop chunks without having to worry about type casts.
Click to show internal directories.
Click to hide internal directories.