OSDN Git Service

change interval (#360)
authoriczc <iczcalan@gmail.com>
Fri, 26 Jul 2019 08:58:36 +0000 (16:58 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 26 Jul 2019 08:58:36 +0000 (16:58 +0800)
* change interval

* update

* delete unused

toolbar/consensusreward/consensusreward.go

index 2649426..327bf02 100644 (file)
@@ -52,7 +52,7 @@ func (s *StandbyNodeReward) getStandbyNodeReward(height uint64) error {
 }
 
 func (s *StandbyNodeReward) Settlement() error {
-       for height := s.startHeight; height <= s.endHeight; height += consensus.ActiveNetParams.RoundVoteBlockNums {
+       for height := s.startHeight + consensus.ActiveNetParams.RoundVoteBlockNums; height <= s.endHeight; height += consensus.ActiveNetParams.RoundVoteBlockNums {
                if err := s.getStandbyNodeReward(height - consensus.ActiveNetParams.RoundVoteBlockNums); err != nil {
                        return err
                }