devnetutils

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEnodeString = errors.New("invalid enode string")

Functions

func ClearDevDB

func ClearDevDB(dataDir string, logger log.Logger) error

ClearDevDB cleans up the dev folder used for the operations

func GenerateTopic

func GenerateTopic(signature string) []libcommon.Hash

func HexToInt

func HexToInt(hexStr string) uint64

HexToInt converts a hexadecimal string to uint64

func NamespaceAndSubMethodFromMethod

func NamespaceAndSubMethodFromMethod(method string) (string, string, error)

NamespaceAndSubMethodFromMethod splits a parent method into namespace and the actual method

func RandomInt

func RandomInt(max int) int

func RandomNumberInRange

func RandomNumberInRange(min, max uint64) (uint64, error)

RandomNumberInRange returns a random number between min and max NOT inclusive

func UniqueIDFromEnode

func UniqueIDFromEnode(enode string) (string, error)

UniqueIDFromEnode returns the unique ID from a node's enode, removing the `?discport=0` part

Types

This section is empty.

Jump to

Keyboard shortcuts

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