Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProtocolID is the ID of protocol ProtocolID = "rewards" // RewardHistoryTableName is the table name of reward history RewardHistoryTableName = "reward_history" // AccountRewardTableName is the table name of account rewards AccountRewardTableName = "account_reward" // EpochCandidateIndexName is the index name of epoch number and candidate name on account reward view EpochCandidateIndexName = "epoch_candidate_index" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountReward ¶
type AccountReward struct { EpochNumber uint64 CandidateName string BlockReward string EpochReward string FoundationBonus string }
AccountReward defines the schema of "account reward" view
type Protocol ¶
type Protocol struct { Store s.Store NumDelegates uint64 NumCandidateDelegates uint64 NumSubEpochs uint64 RewardAddrToName map[string]string }
Protocol defines the protocol of indexing blocks
func NewProtocol ¶
NewProtocol creates a new protocol
func (*Protocol) CreateTables ¶
CreateTables creates tables
func (*Protocol) HandleBlock ¶
HandleBlock handles blocks
func (*Protocol) Initialize ¶
Initialize initializes rewards protocol
Click to show internal directories.
Click to hide internal directories.