Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
NewStorage creates a pebble-backed payload storage. The reason we use a separate storage for payloads we need a Comparer with a custom Split function.
It needs to access the last available payload with height less or equal to the requested height. This means all point-lookups are range scans.
func (*Storage) BatchSetPayload ¶
func (s *Storage) BatchSetPayload( height uint64, entries flow.RegisterEntries, ) error
BatchSetPayload sets the given entries in a batch.
func (*Storage) GetPayload ¶
GetPayload returns the most recent updated payload for the given RegisterID. "most recent" means the updates happens most recent up the given height.
For example, if there are 2 values stored for register A at height 6 and 11, then GetPayload(13, A) would return the value at height 11.
If no payload is found, an empty byte slice is returned.