util

package
v0.0.0-...-262d4b5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBackoff = Backoff{
	MaxDelay: 120 * time.Second,
	// contains filtered or unexported fields
}
View Source
var RetryCount = 0

重连次数记录

Functions

func AddressEquals

func AddressEquals(a, b common.Address) bool

func Byte2Byte32

func Byte2Byte32(src []byte) [32]byte

byte[] --> byte[32] 不校验长度,已校验过

func CheckCategory

func CheckCategory(category int64) bool

检测转账类型

func GetCurrentIp

func GetCurrentIp() string

func GetRecAddress

func GetRecAddress(req comm.RequestModel) (common.Address, error)

func HexToHash

func HexToHash(hashStr string) common.Hash

func ReadNumberFromFile

func ReadNumberFromFile(filePath string) (*big.Int, error)

func String2Hash

func String2Hash(hashStr string) common.Hash

func WriteNumberToFile

func WriteNumberToFile(filePath string, blkNumber *big.Int) error

Types

type Backoff

type Backoff struct {
	MaxDelay time.Duration
	// contains filtered or unexported fields
}

func (Backoff) Duration

func (bc Backoff) Duration(retries int) time.Duration

Jump to

Keyboard shortcuts

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