Documentation ¶
Index ¶
- Variables
- func GeneralProxyHashExtractor(ctx context.Context, qAddr common.Address, blockNo *uint64) *common.Hash
- func MastenodeEnode(ipv4address uint32, pubkey [2][32]byte, cfg *params.ChainConfig) *enode.Node
- func SWVersionIntToString(semver *big.Int) string
- func SWVersionToInt() *big.Int
- type CacheChain
- type CacheQuery
- type CacheStorage
- type GeneralProxyHashFunc
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidData = errors.New("Invalid data returned by the CacheQuery func")
ErrInvalidData is returned if the CacheQuery function returns a null result
Functions ¶
func GeneralProxyHashExtractor ¶
func GeneralProxyHashExtractor(ctx context.Context, qAddr common.Address, blockNo *uint64) *common.Hash
GeneralProxyHashExtractor retrieves if it exists the proxy hash func passed through the context.
func MastenodeEnode ¶
func SWVersionIntToString ¶ added in v0.7.4
SWVersionIntToString returns a string from the provided software version int.
func SWVersionToInt ¶ added in v0.7.4
SWVersionToInt converts the current semantic software version to an integer.
Types ¶
type CacheChain ¶
CacheChain defines the method(s) needed by the cache implementation to access the chain data.
type CacheQuery ¶
CacheQuery is the function that allow a fresh data query if the previous data held is considered to have expired or the cache was empty in the first place.
type CacheStorage ¶
type CacheStorage struct {
// contains filtered or unexported fields
}
CacheStorage is a storage that is held by the client that wants to cache specific data.
func NewCacheStorage ¶
func NewCacheStorage() *CacheStorage
NewCacheStorage creates a new CacheStorage instance.
func (*CacheStorage) Get ¶
func (c *CacheStorage) Get(chain CacheChain, source CacheQuery) (interface{}, error)
Get returns the cached data entry if it hasn't expired(new blockhash generated). An error is returned if a nil cache instance is used or the cache query function returns nil data.
type GeneralProxyHashFunc ¶
GeneralProxyHashFunc provides the function that helps check for governed proxy contracts filtered logs.
func GeneralProxyHashGen ¶
func GeneralProxyHashGen(blockchain *core.BlockChain) GeneralProxyHashFunc
GeneralProxyHashGen returns a function that helps retrieve the governed proxy contract hash.