broadcaster

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 10 Imported by: 1

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 added in v0.7.3

func NewBSCBroadcaster() *Broadcaster

func NewBSCTestnetBroadcaster added in v0.7.3

func NewBSCTestnetBroadcaster() *Broadcaster

func NewBroadcaster

func NewBroadcaster() *Broadcaster

func NewGenericBroadcaster added in v0.2.4

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

func NewKovanBroadcaster added in v0.5.0

func NewKovanBroadcaster() *Broadcaster

func NewRinkebyBroadcaster added in v0.5.0

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