test

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorRollupIdMismatch = errors.New("rollup id mismatch")

ErrorRollupIdMismatch is returned when the rollup id does not match

Functions

This section is empty.

Types

type DummySequencer

type DummySequencer struct {
	sequencing.RollupId
	// contains filtered or unexported fields
}

DummySequencer is a dummy sequencer for testing that serves a single rollup

func NewDummySequencer

func NewDummySequencer() *DummySequencer

NewDummySequencer creates a new DummySequencer

func (*DummySequencer) GetNextBatch

func (d *DummySequencer) GetNextBatch(ctx context.Context, lastBatch *sequencing.Batch) (*sequencing.Batch, error)

GetNextBatch implements sequencing.Sequencer.

func (*DummySequencer) SubmitRollupTransaction

func (d *DummySequencer) SubmitRollupTransaction(ctx context.Context, rollupId []byte, tx []byte) error

SubmitRollupTransaction implements sequencing.Sequencer.

func (*DummySequencer) VerifyBatch

func (d *DummySequencer) VerifyBatch(ctx context.Context, batch *sequencing.Batch) (bool, error)

VerifyBatch implements sequencing.Sequencer.

type TransactionQueue

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

TransactionQueue is a queue of transactions

func NewTransactionQueue

func NewTransactionQueue() *TransactionQueue

NewTransactionQueue creates a new TransactionQueue

func (*TransactionQueue) AddTransaction

func (tq *TransactionQueue) AddTransaction(tx sequencing.Tx)

AddTransaction adds a new transaction to the queue

func (*TransactionQueue) GetNextBatch

func (tq *TransactionQueue) GetNextBatch() sequencing.Batch

GetNextBatch extracts a batch of transactions from the queue

Jump to

Keyboard shortcuts

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