pingpong

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	From uint64 // From chain ID
	To   uint64 // To chain ID
}

Edge defines a unique edge between two ping pong contracts.

type XDapp

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

XDapp defines the deployed pingpong contract xdapp. The XDapp is graph of ping pong pairs that connects all chains to all chains. So given a network of N chains (vertexes), there will be N! pairs (edges).

func Deploy

func Deploy(ctx context.Context, network netconf.Network, backends ethbackend.Backends) (XDapp, error)

func (*XDapp) LogBalances

func (d *XDapp) LogBalances(ctx context.Context) error

func (*XDapp) StartAllEdges

func (d *XDapp) StartAllEdges(ctx context.Context, latest, parallel, count uint64) error

StartAllEdges starts <parallel> ping pongs for all edges, each doing <count> hops.

func (*XDapp) WaitDone

func (d *XDapp) WaitDone(ctx context.Context) error

WaitDone waits for all edges to complete the hops of a single ping pong. Note this doesn't wait for all parallel ping pongs to complete, it only waits for one of P.

func (*XDapp) Watch

func (d *XDapp) Watch(ctx context.Context) error

Watch watches all PingPong contracts for Ping events and logs them.

Jump to

Keyboard shortcuts

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