common

package
v0.0.0-...-422065e 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: 18 Imported by: 0

Documentation

Overview

Copyright 2017. box.la authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2017. box.la authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const AddressLength = common.AddressLength

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 Address) bool

func Byte2Byte32

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

func BytesToAddress

func BytesToAddress(data []byte) common.Address

func BytesToHash

func BytesToHash(data []byte) common.Hash

func BytesToHex

func BytesToHex(data []byte, with0x bool) string

func GenCert

func GenCert(cfg *config.Config, certScriptFile string) error

func GenSecret

func GenSecret(len int) ([]byte, error)

func GetServerCert

func GetServerCert(cfg *config.Config) string

func GetServerKey

func GetServerKey(cfg *config.Config) string

func HexToAddress

func HexToAddress(data string) common.Address

func HexToBytes

func HexToBytes(hexstr string) ([]byte, error)

func HexToHash

func HexToHash(hexstr string) common.Hash

func LoadConfig

func LoadConfig(filePath string) (*config.Config, error)

Types

type Address

type Address = common.Address

type Backoff

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

func (Backoff) Duration

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

type EtherLog

type EtherLog = types.Log

type Hash

type Hash = common.Hash

func SignEvent

func SignEvent(f string) Hash

Jump to

Keyboard shortcuts

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