common

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCompositeKeyForPurgeIndexByHeight

func CreateCompositeKeyForPurgeIndexByHeight(blockHeight uint64, txid string, uuid string) []byte

CreateCompositeKeyForPurgeIndexByHeight creates a key to index private write set based on received at block height such that purge based on block height can be achieved. The structure of the key is <purgeIndexByHeightPrefix>~blockHeight~txid~uuid. TODO add pinning script to expose this function

func CreateCompositeKeyForPvtRWSet

func CreateCompositeKeyForPvtRWSet(txid string, uuid string, blockHeight uint64) []byte

CreateCompositeKeyForPvtRWSet creates a key for storing private write set in the transient store. The structure of the key is <prwsetPrefix>~txid~uuid~blockHeight. TODO add pinning script to expose this function

func SplitCompositeKeyOfPurgeIndexByHeight

func SplitCompositeKeyOfPurgeIndexByHeight(compositeKey []byte) (txid string, uuid string, blockHeight uint64, err error)

SplitCompositeKeyOfPurgeIndexByHeight splits the compositeKey (<purgeIndexByHeightPrefix>~blockHeight~txid~uuid) into txid, uuid and blockHeight. TODO add pinning script to expose this function

func SplitCompositeKeyOfPvtRWSet

func SplitCompositeKeyOfPvtRWSet(compositeKey []byte) (uuid string, blockHeight uint64, err error)

SplitCompositeKeyOfPvtRWSet splits the compositeKey (<prwsetPrefix>~txid~uuid~blockHeight) into uuid and blockHeight. TODO add pinning script to expose this function

func TrimPvtCollectionConfigs

func TrimPvtCollectionConfigs(configs map[string]*pb.CollectionConfigPackage,
	filter ledger.PvtNsCollFilter) (map[string]*pb.CollectionConfigPackage, error)

TrimPvtCollectionConfigs returns a map of `CollectionConfigPackage` with configs retained only for config types 'staticCollectionConfig' supplied in the filter A nil filter does not set Config to any collectionConfigPackage and returns a map with empty configs for each `configs` element TODO add pinning script to expose this function and add below comment

func TrimPvtWSet

TrimPvtWSet returns a `TxPvtReadWriteSet` that retains only list of 'ns/collections' supplied in the filter A nil filter does not filter any results and returns the original `pvtWSet` as is TODO add pinning script to expose this function

Types

This section is empty.

Jump to

Keyboard shortcuts

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