network

package
v1.12.0-initial-poc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: BSD-3-Clause Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ErrFailedToParseWarpAddressedCall = iota + 1
	ErrWarpAddressedCallHasSourceAddress
	ErrFailedToParseWarpAddressedCallPayload
	ErrUnsupportedWarpAddressedCallPayloadType

	ErrFailedToParseJustification
	ErrConversionDoesNotExist
	ErrMismatchedConversionID

	ErrMismatchedValidationID
	ErrValidationDoesNotExist
	ErrValidationExists
	ErrValidationCouldBeRegistered

	ErrImpossibleNonce
	ErrWrongNonce
	ErrWrongWeight
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LockedTxVerifier added in v1.10.18

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

func NewLockedTxVerifier added in v1.10.18

func NewLockedTxVerifier(lock sync.Locker, txVerifier TxVerifier) *LockedTxVerifier

func (*LockedTxVerifier) VerifyTx added in v1.10.18

func (l *LockedTxVerifier) VerifyTx(tx *txs.Tx) error

type Network

type Network struct {
	*p2p.Network
	// contains filtered or unexported fields
}

func New

func New(
	log logging.Logger,
	nodeID ids.NodeID,
	subnetID ids.ID,
	vdrs validators.State,
	txVerifier TxVerifier,
	mempool mempool.Mempool,
	partialSyncPrimaryNetwork bool,
	appSender common.AppSender,
	stateLock sync.Locker,
	state state.Chain,
	signer warp.Signer,
	registerer prometheus.Registerer,
	config config.NetworkConfig,
) (*Network, error)

func (*Network) AppGossip added in v1.11.2

func (n *Network) AppGossip(ctx context.Context, nodeID ids.NodeID, msgBytes []byte) error

func (*Network) IssueTxFromRPC added in v1.11.2

func (n *Network) IssueTxFromRPC(tx *txs.Tx) error

func (*Network) PullGossip added in v1.11.2

func (n *Network) PullGossip(ctx context.Context)

func (*Network) PushGossip added in v1.11.2

func (n *Network) PushGossip(ctx context.Context)

type TxVerifier added in v1.10.18

type TxVerifier interface {
	// VerifyTx verifies that the transaction should be issued into the mempool.
	VerifyTx(tx *txs.Tx) error
}

Jump to

Keyboard shortcuts

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