Documentation ¶
Overview ¶
Package pathfinder computes the trie storage path for any given key/value pair
Index ¶
- Constants
- func KeyToPath(key ledger.Key, version uint8) (ledger.Path, error)
- func KeysToPaths(keys []ledger.Key, version uint8) ([]ledger.Path, error)
- func PathsFromPayloads(payloads []*ledger.Payload, version uint8) ([]ledger.Path, error)
- func PayloadsToValues(payloads []*ledger.Payload) ([]ledger.Value, error)
- func QueryToTrieRead(q *ledger.Query, version uint8) (*ledger.TrieRead, error)
- func UpdateToPayloads(update *ledger.Update) ([]*ledger.Payload, error)
- func UpdateToTrieUpdate(u *ledger.Update, version uint8) (*ledger.TrieUpdate, error)
Constants ¶
View Source
const PathByteSize = 32
PathByteSize captures number of bytes each path takes
Variables ¶
This section is empty.
Functions ¶
func KeyToPath ¶
KeyToPath converts key into a path version zero applies sha2-256 on value of the key parts (in order ignoring types)
func KeysToPaths ¶
KeysToPaths converts an slice of keys into a paths
func PathsFromPayloads ¶ added in v0.12.0
PathsFromPayloads constructs paths from an slice of payload
func PayloadsToValues ¶
PayloadsToValues extracts values from an slice of payload
func QueryToTrieRead ¶
QueryToTrieRead converts a ledger query into a trie read
func UpdateToPayloads ¶
UpdateToPayloads constructs an slice of payloads given ledger update
func UpdateToTrieUpdate ¶
UpdateToTrieUpdate converts an update into a trie update
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.