broadcaster

package
v0.0.0-...-0c526e4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 10 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

var SharedBroadcaster *Broadcaster

func NewBroadcaster

func NewBroadcaster() *Broadcaster

func NewRopstenBroadcaster

func NewRopstenBroadcaster() *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