configFilePath := cfg.ConfigFile()
if _, err := os.Stat(configFilePath); !os.IsNotExist(err) {
log.WithFields(log.Fields{"module": logModule, "config": configFilePath}).Fatal("Already exists config file.")
+ return
}
if err := cfg.ExportFederationFile(configFilePath, config); err != nil {
)
func init() {
- runRewardCmd.Flags().Uint64Var(&rewardStartHeight, "reward_start_height", 1, "The starting height of the distributive income reward interval")
+ runRewardCmd.Flags().Uint64Var(&rewardStartHeight, "reward_start_height", 1200, "The starting height of the distributive income reward interval")
runRewardCmd.Flags().Uint64Var(&rewardEndHeight, "reward_end_height", 2400, "The end height of the distributive income reward interval")
RootCmd.AddCommand(runRewardCmd)
+++ /dev/null
-package reward
-
-type VoteInfo struct {
- XPub string
- Address string
- VoteNum uint64
- VoteHeight uint64
- VetoHeight uint64
- VoteBlockNum uint64
-}
}
func NewChainKeeper(db *gorm.DB, cfg *config.Config, syncHeight uint64) *ChainKeeper {
-
keeper := &ChainKeeper{
cfg: &cfg.Chain,
db: db,
}
func (c *ChainKeeper) Start() {
-
for {
blockState := &orm.BlockState{}
if err := c.db.First(blockState).Error; err != nil {