utils

package
v0.3.0-beta.rc.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: GPL-3.0 Imports: 11 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TR_enable = false

Functions

func DeepCopy

func DeepCopy(dst, src interface{})

func Int64ToBytes

func Int64ToBytes(r int64) []byte

func StringToUint256

func StringToUint256(str string) keys.Uint256

func Uint256SliceCut

func Uint256SliceCut(is []keys.Uint256, l int) (ret []keys.Uint256)

func Uint64ToBytes

func Uint64ToBytes(r uint64) []byte

Types

type I256

type I256 big.Int
var I256_0 I256 = I256(*big.NewInt(0))

func NewI256

func NewI256(i int64) (ret I256)

func (I256) Abs

func (self I256) Abs() (ret U256)

func (*I256) AddI

func (self *I256) AddI(a *I256)

func (*I256) AddU

func (self *I256) AddU(a *U256)

func (*I256) Cmp

func (self *I256) Cmp(a *I256) int

func (*I256) DecodeRLP

func (b *I256) DecodeRLP(s *rlp.Stream) error

func (I256) EncodeRLP

func (b I256) EncodeRLP(w io.Writer) error

func (*I256) GobDecode

func (z *I256) GobDecode(buf []byte) error

func (*I256) GobEncode

func (x *I256) GobEncode() ([]byte, error)

func (I256) IsPositive

func (self I256) IsPositive() bool

func (I256) MarshalText

func (b I256) MarshalText() ([]byte, error)

func (*I256) Reverse

func (self *I256) Reverse()

func (*I256) SubI

func (self *I256) SubI(a *I256)

func (*I256) SubU

func (self *I256) SubU(a *U256)

func (*I256) ToIntRef

func (self *I256) ToIntRef() (ret *big.Int)

func (I256) ToRef

func (self I256) ToRef() (ret *I256)

func (*I256) ToUint256

func (self *I256) ToUint256() (ret keys.Uint256)

func (*I256) UnmarshalJSON

func (b *I256) UnmarshalJSON(input []byte) error

func (*I256) UnmarshalText

func (b *I256) UnmarshalText(input []byte) error

type Proc

type Proc interface {
	Run() bool
}

type Procs

type Procs struct {
	Runs []Proc
	// contains filtered or unexported fields
}

func NewProcs

func NewProcs(num int) (ret Procs)

func (*Procs) StartProc

func (self *Procs) StartProc(run Proc)

func (*Procs) Wait

func (self *Procs) Wait() []Proc

type ProcsPool

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

func NewProcsPool

func NewProcsPool(numget func() int) (ret ProcsPool)

func (*ProcsPool) GetProcs

func (self *ProcsPool) GetProcs() (ret *Procs)

func (*ProcsPool) PutProcs

func (self *ProcsPool) PutProcs(p *Procs)

type TimeRecord

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

func TR_enter

func TR_enter(name string) (tr TimeRecord)

func (*TimeRecord) Leave

func (tr *TimeRecord) Leave()

func (*TimeRecord) Renter

func (tr *TimeRecord) Renter(name string)

type U256

type U256 big.Int
var U256_0 U256 = U256(*big.NewInt(0))

func NewU256

func NewU256(i uint64) (ret U256)

func NewU256_ByKey

func NewU256_ByKey(k *keys.Uint256) (ret U256)

func (*U256) AddU

func (self *U256) AddU(a *U256)

func (*U256) Cmp

func (self *U256) Cmp(a *U256) int

func (*U256) DecodeRLP

func (b *U256) DecodeRLP(s *rlp.Stream) error

func (U256) EncodeRLP

func (b U256) EncodeRLP(w io.Writer) error

func (*U256) GobDecode

func (z *U256) GobDecode(buf []byte) error

func (*U256) GobEncode

func (x *U256) GobEncode() ([]byte, error)

func (U256) MarshalText

func (b U256) MarshalText() ([]byte, error)

func (*U256) SubU

func (self *U256) SubU(a *U256)

func (*U256) ToI256

func (self *U256) ToI256() (ret I256)

func (*U256) ToIntRef

func (self *U256) ToIntRef() (ret *big.Int)

func (U256) ToRef

func (self U256) ToRef() (ret *U256)

func (*U256) ToUint256

func (self *U256) ToUint256() (ret keys.Uint256)

func (*U256) UnmarshalJSON

func (b *U256) UnmarshalJSON(input []byte) error

func (*U256) UnmarshalText

func (b *U256) UnmarshalText(input []byte) error

type Uint256s

type Uint256s []keys.Uint256

func (Uint256s) Len

func (self Uint256s) Len() int

func (Uint256s) Less

func (self Uint256s) Less(i, j int) bool

func (Uint256s) Swap

func (self Uint256s) Swap(i, j int)

Jump to

Keyboard shortcuts

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