test

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRollupId = errors.New("invalid rollup id")

ErrInvalidRollupId is returned when the rollup id is invalid

Functions

This section is empty.

Types

type DummySequencer

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

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

func NewDummySequencer

func NewDummySequencer(rollupId []byte) *DummySequencer

NewDummySequencer creates a new DummySequencer

func (*DummySequencer) GetNextBatch

GetNextBatch implements sequencing.Sequencer.

func (*DummySequencer) SubmitRollupTransaction

SubmitRollupTransaction implements sequencing.Sequencer.

func (*DummySequencer) VerifyBatch

VerifyBatch implements sequencing.Sequencer.

type MultiRollupSequencer added in v0.3.0

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

MultiRollupSequencer is a sequencer for testing that serves multiple rollups

func NewMultiRollupSequencer added in v0.3.0

func NewMultiRollupSequencer() *MultiRollupSequencer

NewMultiRollupSequencer creates a new MultiRollupSequencer

func (*MultiRollupSequencer) GetNextBatch added in v0.3.0

GetNextBatch implements sequencing.Sequencer.

func (*MultiRollupSequencer) SubmitRollupTransaction added in v0.3.0

SubmitRollupTransaction implements sequencing.Sequencer.

func (*MultiRollupSequencer) VerifyBatch added in v0.3.0

VerifyBatch implements sequencing.Sequencer.

type RollupData added in v0.3.0

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

RollupData holds the data for a specific rollup, including its transaction queue, last batch hash, and seen batches.

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(maxBytes uint64) *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