Documentation ¶
Overview ¶
Cache for assets
temporary store assets just received until they are: a. verified by having a corresponding issue verified b. confirmed by having a block broadcast containing them c. expired because no longer referenced by any issues
i.e. all isues were expired
Index ¶
- func Cache(asset *transactionrecord.AssetData) (*transactionrecord.AssetIdentifier, transactionrecord.Packed, error)
- func Delete(assetId transactionrecord.AssetIdentifier)
- func Exists(assetId transactionrecord.AssetIdentifier) bool
- func Finalise() error
- func Get(assetId transactionrecord.AssetIdentifier) transactionrecord.Packed
- func Initialise() error
- func SetVerified(assetId transactionrecord.AssetIdentifier)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cache ¶
func Cache(asset *transactionrecord.AssetData) (*transactionrecord.AssetIdentifier, transactionrecord.Packed, error)
cache an incoming asset
func Exists ¶
func Exists(assetId transactionrecord.AssetIdentifier) bool
check if an asset is exist and is confirmed
func Get ¶
func Get(assetId transactionrecord.AssetIdentifier) transactionrecord.Packed
get packed asset data from cache (nil if not present)
func SetVerified ¶
func SetVerified(assetId transactionrecord.AssetIdentifier)
mark a cached asset being verified
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.