txcache

package
v0.77.0-preview.8 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxCache

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

func NewTxCache

func NewTxCache(commander *nodewallets.Commander) *TxCache

func (*TxCache) GetRawTxs

func (t *TxCache) GetRawTxs(height uint64) [][]byte

func (*TxCache) GetState

func (t *TxCache) GetState(k string) ([]byte, []types.StateProvider, error)

func (*TxCache) IsDelayRequired

func (t *TxCache) IsDelayRequired(marketID string) bool

IsDelayRequired returns true if the market supports transaction reordering.

func (*TxCache) IsDelayRequiredAnyMarket

func (t *TxCache) IsDelayRequiredAnyMarket() bool

IsDelayRequiredAnyMarket returns true of there is any market that supports transaction reordering.

func (*TxCache) Keys

func (t *TxCache) Keys() []string

func (*TxCache) LoadState

func (t *TxCache) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)

func (*TxCache) MarketDelayRequiredUpdated

func (t *TxCache) MarketDelayRequiredUpdated(marketID string, required bool)

MarketDelayRequiredUpdated is called when the market configuration is created/updated with support for transaction reordering.

func (*TxCache) Namespace

func (t *TxCache) Namespace() types.SnapshotNamespace

func (*TxCache) NewDelayedTransaction

func (t *TxCache) NewDelayedTransaction(ctx context.Context, delayed [][]byte, currentHeight uint64) []byte

NewDelayedTransaction creates a new delayed transaction with a target block height being the current block being proposed + the configured network param indicating the target delay.

func (*TxCache) OnNumBlocksToDelayUpdated

func (t *TxCache) OnNumBlocksToDelayUpdated(_ context.Context, blocks *num.Uint) error

OnNumBlocksToDelayUpdated is called when the network parameter for the number of blocks to delay transactions is updated.

func (*TxCache) SetRawTxs

func (t *TxCache) SetRawTxs(rtx [][]byte, height uint64)

func (*TxCache) StopSnapshots

func (e *TxCache) StopSnapshots()

func (*TxCache) Stopped

func (t *TxCache) Stopped() bool

Jump to

Keyboard shortcuts

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