Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Carrier ¶
type Carrier interface { // BlockTimestamp returns the timestamp of a block BlockTimestamp(uint64) (time.Time, error) // SubscribeNewBlock callbacks on new block created SubscribeNewBlock(chan *TipInfo, chan error, chan bool) // Tip returns the latest height and its timestamp Tip() (*TipInfo, error) // Candidates returns the candidates on height Candidates(uint64, *big.Int, uint8) (*big.Int, []*types.Candidate, error) // Votes returns the votes on height Votes(uint64, *big.Int, uint8) (*big.Int, []*types.Vote, error) // Close closes carrier Close() }
Carrier defines an interfact to fetch votes
type EthClientPool ¶ added in v0.1.11
type EthClientPool struct {
// contains filtered or unexported fields
}
EthClientPool defines a set of ethereum clients with execute interface
func NewEthClientPool ¶ added in v0.1.11
func NewEthClientPool(urls []string) *EthClientPool
NewEthClientPool creates a new pool
func (*EthClientPool) Close ¶ added in v0.1.11
func (pool *EthClientPool) Close()
Close closes the current client if available
type EthereumBucketsResult ¶ added in v0.1.1
type EthereumBucketsResult struct { Count *big.Int Indexes []*big.Int StakeStartTimes []*big.Int StakeDurations []*big.Int Decays []bool StakedAmounts []*big.Int CanNames [][12]byte Owners []common.Address }
EthereumBucketsResult defines the data structure the buckets api returns
Click to show internal directories.
Click to hide internal directories.