Documentation ¶
Index ¶
- Constants
- func Contains(arr []string, item string) bool
- func MarshallTime(t *big.Int) []byte
- func MarshallTime2(tm time.Time) []byte
- func StrToTime(str string) (time.Time, error)
- func StrToUnixTimeInt(str string) (*big.Int, error)
- func UnmarshallIntToTime(value *big.Int) time.Time
- func UnmarshallTime(value []byte) time.Time
- func UnmarshallTimeToInt(value []byte) *big.Int
Constants ¶
View Source
const ( // AddressZero some transactions do not have To address, use this address instead AddressZero = "0x0000000000000000000000000000000000000000" // DefaultIpc the default ipc path DefaultIpc = "/home/blockform/.ethereum/geth.ipc" // DefaultDbPath default database path, a folder then prefix DefaultDbPath = "/home/blockform/account-indexer-db/geth_indexer_leveldb" // NumMaxTransaction if number of transaction is more than this, just return +10000 to the client NumMaxTransaction = 10000 // DefaultCleanInterval In minute DefaultCleanInterval = 5 // DefaultBlockTTL In hour DefaultBlockTTL = 4 // DefaultWatcherInterval in minute DefaultWatcherInterval = 5 // DefaultOOSThreshold in second DefaultOOSThreshold = 300 // DefaultHTTPPort default http port DefaultHTTPPort = 3000 // DefaultNumBatch default number of init batch DefaultNumBatch = 8 )
Variables ¶
This section is empty.
Functions ¶
func MarshallTime ¶
MarshallTime marshall unix time to byte array
func StrToUnixTimeInt ¶
StrToUnixTimeInt unmarshall a unix time in string to unix time in big int
func UnmarshallIntToTime ¶
UnmarshallIntToTime unmarshall a unix time to time
func UnmarshallTime ¶
UnmarshallTime unmarshall a time in byte array to time
func UnmarshallTimeToInt ¶
UnmarshallTimeToInt unmarshall a time in byte array to unix
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.