Documentation ¶
Index ¶
- type TxCache
- func (t *TxCache) GetRawTxs(height uint64) [][]byte
- func (t *TxCache) GetState(k string) ([]byte, []types.StateProvider, error)
- func (t *TxCache) IsDelayRequired(marketID string) bool
- func (t *TxCache) IsDelayRequiredAnyMarket() bool
- func (t *TxCache) Keys() []string
- func (t *TxCache) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)
- func (t *TxCache) MarketDelayRequiredUpdated(marketID string, required bool)
- func (t *TxCache) Namespace() types.SnapshotNamespace
- func (t *TxCache) NewDelayedTransaction(ctx context.Context, delayed [][]byte, currentHeight uint64) []byte
- func (t *TxCache) OnNumBlocksToDelayUpdated(_ context.Context, blocks *num.Uint) error
- func (t *TxCache) SetRawTxs(rtx [][]byte, height uint64)
- func (e *TxCache) StopSnapshots()
- func (t *TxCache) Stopped() bool
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) IsDelayRequired ¶
IsDelayRequired returns true if the market supports transaction reordering.
func (*TxCache) IsDelayRequiredAnyMarket ¶
IsDelayRequiredAnyMarket returns true of there is any market that supports transaction reordering.
func (*TxCache) MarketDelayRequiredUpdated ¶
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 ¶
OnNumBlocksToDelayUpdated is called when the network parameter for the number of blocks to delay transactions is updated.
func (*TxCache) StopSnapshots ¶
func (e *TxCache) StopSnapshots()
Click to show internal directories.
Click to hide internal directories.