workqueue

package
v0.0.0-...-b6f889b Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportBlockSignatures

func ExportBlockSignatures(ctx context.Context, commit *tmtypes.Commit, validators *tmctypes.ResultValidators, db *sql.DB) error

ExportBlockSignatures ...

func ExportValidator

func ExportValidator(ctx context.Context, val *tmtypes.Validator, db *sql.DB) error

ExportValidator exports validator

func SetBlockSignature

func SetBlockSignature(ctx context.Context, commit *tmtypes.Commit, sig tmtypes.CommitSig, vp, pp int64, db *sql.DB) error

SetBlockSignature stores a block prevote

Types

type Worker

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

Worker is the queue processor.

func NewWorker

func NewWorker(cdc codec.Marshaler, amino *codec.LegacyAmino, queue <-chan int64, db *sql.DB, cp *client.Proxy) *Worker

NewWorker returns an intialized worker

func (*Worker) ExportBlock

func (w *Worker) ExportBlock(ctx context.Context, b *tmctypes.ResultBlock, txs []*sdk.TxResponse, validators *tmctypes.ResultValidators, db *sql.DB) error

ExportBlock exports a block by processing it.

func (*Worker) Start

func (w *Worker) Start(ctx context.Context)

Start runs the listener that process blocks.

func (*Worker) WithGenesisHeight

func (w *Worker) WithGenesisHeight(height int64)

WithGenesisHeight sets the first block height

Jump to

Keyboard shortcuts

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