Documentation
¶
Index ¶
- type Config
- type SettlementLayerClient
- func (s *SettlementLayerClient) Init(config []byte, pubsub *pubsub.Server, logger log.Logger) error
- func (s *SettlementLayerClient) RetrieveBatch(slStateIndex ...uint64) (*settlement.ResultRetrieveBatch, error)
- func (s *SettlementLayerClient) Start() error
- func (s *SettlementLayerClient) Stop() error
- func (s *SettlementLayerClient) SubmitBatch(batch *types.Batch, daResult *da.ResultSubmitBatch) *settlement.ResultSubmitBatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AutoUpdateBatches bool `json:"auto_update_batches"` AutoUpdateBatchInterval time.Duration `json:"auto_update_batch_interval"` BatchSize uint64 `json:"batch_size"` LatestHeight uint64 `json:"latest_height"` // The height at which the new batchSize started BatchOffsetHeight uint64 `json:"batch_offset_height"` DBPath string `json:"db_path"` RootDir string `json:"root_dir"` // contains filtered or unexported fields }
Config for the SettlementLayerClient mock
type SettlementLayerClient ¶
type SettlementLayerClient struct {
// contains filtered or unexported fields
}
SettlementLayerClient is intended only for usage in tests.
func (*SettlementLayerClient) RetrieveBatch ¶
func (s *SettlementLayerClient) RetrieveBatch(slStateIndex ...uint64) (*settlement.ResultRetrieveBatch, error)
RetrieveBatch Gets the batch which contains the given stateIndex. Empty stateIndex returns the latest batch.
func (*SettlementLayerClient) Start ¶
func (s *SettlementLayerClient) Start() error
Start is called once, after init. If configured so, it will start producing batches every interval.
func (*SettlementLayerClient) Stop ¶
func (s *SettlementLayerClient) Stop() error
Stop is called once, after Start. it cancels the auto batches created, if such was started.
func (*SettlementLayerClient) SubmitBatch ¶
func (s *SettlementLayerClient) SubmitBatch(batch *types.Batch, daResult *da.ResultSubmitBatch) *settlement.ResultSubmitBatch
SubmitBatch submits the batch to the settlement layer. This should create a transaction which (potentially) triggers a state transition in the settlement layer.
Click to show internal directories.
Click to hide internal directories.