pvm

package
v0.0.0-...-58bdd35 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxSerializationLen = (16 * 1024 * 1024) - 1

	ChainID = ids.ID{}

	ErrUnknownBlockType = errors.New("unknown block type")
)

Functions

This section is empty.

Types

type PtxDataModel

type PtxDataModel struct {
	Tx        *txs.Tx               `json:"tx,omitempty"`
	TxType    *string               `json:"txType,omitempty"`
	Block     *blocks.Block         `json:"block,omitempty"`
	BlockID   *string               `json:"blockID,omitempty"`
	BlockType *string               `json:"blockType,omitempty"`
	Proposer  *models.BlockProposal `json:"proposer,omitempty"`
}

type Writer

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

func NewWriter

func NewWriter(networkID uint32, chainID string) (*Writer, error)

func (*Writer) Bootstrap

func (w *Writer) Bootstrap(ctx context.Context, conns *utils.Connections, persist db.Persist) error

func (*Writer) Consume

func (w *Writer) Consume(ctx context.Context, conns *utils.Connections, c services.Consumable, persist db.Persist) error

func (*Writer) ConsumeConsensus

func (w *Writer) ConsumeConsensus(_ context.Context, _ *utils.Connections, _ services.Consumable, _ db.Persist) error

func (*Writer) InsertTransactionBlock

func (w *Writer) InsertTransactionBlock(ctx services.ConsumerCtx, txID ids.ID, blkTxID ids.ID) error

func (*Writer) InsertTransactionValidator

func (w *Writer) InsertTransactionValidator(ctx services.ConsumerCtx, txID ids.ID, validator validator.Validator) error

func (*Writer) Name

func (*Writer) Name() string

func (*Writer) ParseJSON

func (w *Writer) ParseJSON(b []byte, proposer *models.BlockProposal) ([]byte, error)

Jump to

Keyboard shortcuts

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