broadcaster

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

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

Broadcaster takes a signed tx and try to broadcast it to all nodes that it manages as fast as possible. It returns a map of failures and a bool indicating that the tx is broadcasted to at least 1 node

func NewBSCBroadcaster

func NewBSCBroadcaster() *Broadcaster

func NewBSCTestnetBroadcaster

func NewBSCTestnetBroadcaster() *Broadcaster

func NewBroadcaster

func NewBroadcaster() *Broadcaster

func NewGenericBroadcaster

func NewGenericBroadcaster(nodes map[string]string) *Broadcaster

func NewKovanBroadcaster

func NewKovanBroadcaster() *Broadcaster

func NewRinkebyBroadcaster

func NewRinkebyBroadcaster() *Broadcaster

func NewRopstenBroadcaster

func NewRopstenBroadcaster() *Broadcaster

func NewTomoBroadcaster

func NewTomoBroadcaster() *Broadcaster

func (*Broadcaster) Broadcast

func (self *Broadcaster) Broadcast(data string) (string, bool, error)

data must be hex encoded of the signed tx

func (*Broadcaster) BroadcastTx

func (self *Broadcaster) BroadcastTx(tx *types.Transaction) (string, bool, error)

func (*Broadcaster) GetNodes

func (self *Broadcaster) GetNodes() map[string]*rpc.Client

Jump to

Keyboard shortcuts

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