Documentation ¶
Index ¶
- Variables
- func BigIntToBytes(int *big.Int) []byte
- func BytesToBigInt(bytes []byte) *big.Int
- func BytesToUint64(bytes []byte) uint64
- func DealWithErr(v interface{})
- func Expect(t T, current, expected interface{})
- func ExpectAmount(t T, current, expected *big.Int)
- func ExpectBytes(t T, current []byte, expected string)
- func ExpectError(t T, current error, expected error)
- func ExpectJson(t T, current interface{}, expected string)
- func ExpectString(t T, current, expected string)
- func ExpectTrue(t T, value bool)
- func ExpectUint64(t T, current, expected uint64)
- func FailIfErr(t T, err error)
- func GetStack() string
- func HideHashes(a string) string
- func InitLogging(dataPath, logLevelStr string)
- func IsHex(str string) bool
- func IsHexCharacter(c byte) bool
- func JoinBytes(data ...[]byte) []byte
- func MaxInt64(x, y int64) int64
- func MinInt64(x, y int64) int64
- func RecoverStack()
- func StringToBigInt(str string) *big.Int
- func Uint32ToBytes(x uint32) []byte
- func Uint64ToBytes(height uint64) []byte
- type ClockType
- type ErrorWCode
- type Expecter
- type LogSaver
- type Logger
- type T
- type Task
- type TaskResolver
- type Ticker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChainLogger = log15.New("module", "chain") ConsensusLogger = log15.New("module", "consensus") NodeLogger = log15.New("module", "node") P2PLogger = log15.New("module", "p2p") PillarLogger = log15.New("module", "pillar") ProtocolLogger = log15.New("module", "handler") FetcherLogger = ProtocolLogger.New("submodule", "fetcher") DownloaderLogger = ProtocolLogger.New("submodule", "downloader") RPCLogger = log15.New("module", "rpc") VerifierLogger = log15.New("module", "verifier") ZenonLogger = log15.New("module", "zenon") VmLogger = log15.New("module", "vm") SupervisorLogger = log15.New("module", "supervisor") EmbeddedLogger = log15.New("module", "embedded") WalletLogger = log15.New("module", "wallet") )
View Source
var ( Big0 = big.NewInt(0) Big1 = big.NewInt(1) Big2 = big.NewInt(2) Big32 = big.NewInt(32) Big64 = big.NewInt(64) Big100 = big.NewInt(100) Big255 = big.NewInt(255) Big256 = big.NewInt(256) BigP255 = new(big.Int).Exp(Big2, Big255, nil) BigP255m1 = new(big.Int).Sub(BigP255, big.NewInt(1)) BigP256 = new(big.Int).Exp(Big2, Big256, nil) BigP256m1 = new(big.Int).Sub(BigP256, big.NewInt(1)) )
Functions ¶
func BigIntToBytes ¶
func BytesToBigInt ¶
func BytesToUint64 ¶
func ExpectAmount ¶
func ExpectBytes ¶
func ExpectError ¶
func ExpectJson ¶
func ExpectString ¶
func ExpectTrue ¶
func ExpectUint64 ¶
func HideHashes ¶
func InitLogging ¶
func InitLogging(dataPath, logLevelStr string)
func IsHexCharacter ¶
IsHexCharacter returns bool of c being a valid hexadecimal.
func RecoverStack ¶
func RecoverStack()
func StringToBigInt ¶
StringToBigInt The default value is 0 when it cannot parse or the string is ""
func Uint32ToBytes ¶
func Uint64ToBytes ¶
Types ¶
type ErrorWCode ¶
type ErrorWCode interface { server.Error //AddSubErr(err error) ErrorWCode AddDetail(detail string) ErrorWCode }
func NewErrorWCode ¶
func NewErrorWCode(code int, errStr string) ErrorWCode
type Expecter ¶
type Expecter struct {
// contains filtered or unexported fields
}
func LateCaller ¶
func (*Expecter) HideHashes ¶
type Task ¶
type Task interface { Wait() Finished() chan struct{} ForceStop() }
func NewTask ¶
func NewTask(action func(TaskResolver)) Task
type TaskResolver ¶
type TaskResolver interface {
ShouldStop() bool
}
Click to show internal directories.
Click to hide internal directories.