pathfinder

package
v0.37.14-patch.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: AGPL-3.0 Imports: 4 Imported by: 7 modules, 15 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pathfinder computes the trie storage path for any given key/value pair

Index

Constants

View Source
const PathByteSize = 32

PathByteSize captures number of bytes each path takes

Variables

This section is empty.

Functions

func KeyToPath

func KeyToPath(key ledger.Key, version uint8) (ledger.Path, error)

KeyToPath converts key into a path version zero applies sha2-256 on value of the key parts (in order ignoring types)

func KeysToPaths

func KeysToPaths(keys []ledger.Key, version uint8) ([]ledger.Path, error)

KeysToPaths converts an slice of keys into a paths

func PathsFromPayloads added in v0.12.0

func PathsFromPayloads(payloads []*ledger.Payload, version uint8) ([]ledger.Path, error)

PathsFromPayloads constructs paths from an slice of payload

func PayloadsToValues

func PayloadsToValues(payloads []*ledger.Payload) ([]ledger.Value, error)

PayloadsToValues extracts values from an slice of payload

func QueryToTrieRead

func QueryToTrieRead(q *ledger.Query, version uint8) (*ledger.TrieRead, error)

QueryToTrieRead converts a ledger query into a trie read

func UpdateToPayloads

func UpdateToPayloads(update *ledger.Update) ([]*ledger.Payload, error)

UpdateToPayloads constructs an slice of payloads given ledger update

func UpdateToTrieUpdate

func UpdateToTrieUpdate(u *ledger.Update, version uint8) (*ledger.TrieUpdate, error)

UpdateToTrieUpdate converts an update into a trie update

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL