network

package
v1.10.18-rc.8 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 interface {
	common.AppHandler

	// IssueTx verifies the transaction at the currently preferred state, adds
	// it to the mempool, and gossips it to the network.
	IssueTx(context.Context, *txs.Tx) error
}

func New

func New(
	log logging.Logger,
	txVerifier TxVerifier,
	mempool mempool.Mempool,
	partialSyncPrimaryNetwork bool,
	appSender common.AppSender,
) Network

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