cache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMintTargetTxHash

func GetMintTargetTxHash(everTxChainType, everTxData string) (targetChainTxHash string, err error)

func InternalErrToStatus

func InternalErrToStatus(internalErr *paySchema.InternalErr) schema.InternalStatus

func RootHash

func RootHash(prevRoot []byte, ids ...[]byte) []byte

RootHash: packaged unique rootHash

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func New

func New() *Cache

func (*Cache) AddTx

func (c *Cache) AddTx(tx paySchema.Transaction, internalErr *paySchema.InternalErr)

func (*Cache) GetTxByHash

func (c *Cache) GetTxByHash(everHash string) *schema.TxResponse

func (*Cache) SnapSet

func (c *Cache) SnapSet(txs []*schema.TxResponse)
type Header struct {
	RootHash        []byte `json:"rootHash"`
	EverRootHash    []byte `json:"everRootHash"`
	ArId            string `json:"arId"`
	EverHash        []byte `json:"everHash"`
	Nonce           string `json:"nonce"` // ever tx nonce
	BalanceRootHash string `json:"balanceRootHash"`
	// contains filtered or unexported fields
}

func (*Header) GetHeader

func (h *Header) GetHeader() Header

func (*Header) SetHeader

func (h *Header) SetHeader(arId string, everHash []byte, txNonce string, balanceRootHash string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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