relay

package
v1.1.3-mainnet Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxnRelayer

type TxnRelayer interface {
	// relays raw transaction broadcasting asynchronously.
	Relay(signedTx hexutil.Bytes) bool
}

TxnRelayer relays raw transaction by broadcasting to node pool of different regions to accelerate P2P diffusion.

func MustNewEthTxnRelayerFromViper

func MustNewEthTxnRelayerFromViper() TxnRelayer

func MustNewTxnRelayerFromViper

func MustNewTxnRelayerFromViper() TxnRelayer

type TxnRelayerConfig

type TxnRelayerConfig struct {
	BufferSize     int           `default:"2000"`
	Concurrency    int           `default:"1"`
	Retry          int           `default:"3"`
	RetryInterval  time.Duration `default:"1s"`
	RequestTimeout time.Duration `default:"3s"`
	NodeUrls       []string
	EthNodeUrls    []string
}

Jump to

Keyboard shortcuts

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