Versions in this module Expand all Collapse all v1 v1.0.0 Jun 26, 2019 Changes in this version + const AddressLength + const HashLength + const SignatureLength + var Big0 = big.NewInt(0) + var Big1 = big.NewInt(1) + var Big100 = big.NewInt(100) + var Big2 = big.NewInt(2) + var Big256 = big.NewInt(256) + var Big257 = big.NewInt(257) + var Big3 = big.NewInt(3) + var Big32 = big.NewInt(32) + var CacheScale int = 100 + var ScaleByCacheUsageLevel int = 100 + var TotalPhysicalMemGB int = getPhysicalMemorySize() + var WriteThroughCaching = false + func AbsolutePath(datadir string, filename string) string + func Bytes2Hex(d []byte) string + func CopyBytes(b []byte) (copiedBytes []byte) + func EmptyHash(h Hash) bool + func FileExist(filePath string) bool + func FromHex(s string) []byte + func GetScaleByCacheUsageLevel(cacheUsageLevelFlag string) (int, error) + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func IsHexAddress(s string) bool + func IsPrecompiledContractAddress(addr Address) bool + func LeftPadBytes(slice []byte, l int) []byte + func LoadJSON(file string, val interface{}) error + func MakeName(name, version string) string + func PrintDepricationWarning(str string) + func Report(extra ...interface{}) + func RightPadBytes(slice []byte, l int) []byte + func ToHex(b []byte) string + type ARCConfig struct + CacheSize int + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) Address + func HexToAddress(s string) Address + func StringToAddress(s string) Address + func (a *Address) SetBytes(b []byte) + func (a *Address) SetBytesFromFront(b []byte) + func (a *Address) UnmarshalJSON(input []byte) error + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Bytes() []byte + func (a Address) Format(s fmt.State, c rune) + func (a Address) Hash() Hash + func (a Address) Hex() string + func (a Address) MarshalText() ([]byte, error) + func (a Address) String() string + type Cache interface + Add func(key CacheKey, value interface{}) (evicted bool) + Contains func(key CacheKey) bool + Get func(key CacheKey) (value interface{}, ok bool) + Purge func() + func NewCache(config CacheConfiger) Cache + type CacheConfiger interface + type CacheKey interface + type CacheKeyUint64 uint64 + type CacheType int + const ARCChacheType + const FIFOCacheType + const LRUCacheType + const LRUShardCacheType + var DefaultCacheType CacheType = FIFOCacheType + type FIFOCacheConfig struct + CacheSize int + type GovernanceCacheKey string + type Hash [HashLength]byte + func BigToHash(b *big.Int) Hash + func BytesToHash(b []byte) Hash + func HexToHash(s string) Hash + func (h *Hash) SetBytes(b []byte) + func (h *Hash) UnmarshalJSON(input []byte) error + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Format(s fmt.State, c rune) + func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value + func (h Hash) Hex() string + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + func (h Hash) TerminalString() string + type LRUConfig struct + CacheSize int + type LRUShardConfig struct + CacheSize int + NumShards int + type PrettyDuration time.Duration + func (d PrettyDuration) String() string + type StorageSize float64 + func (s StorageSize) String() string + func (s StorageSize) TerminalString() string + type UnprefixedAddress Address + func (a *UnprefixedAddress) UnmarshalText(input []byte) error + func (a UnprefixedAddress) MarshalText() ([]byte, error) + type UnprefixedHash Hash + func (h *UnprefixedHash) UnmarshalText(input []byte) error + func (h UnprefixedHash) MarshalText() ([]byte, error)