OSDN Git Service

change interval
authoriczc <iczcalan@gmail.com>
Fri, 26 Jul 2019 08:32:10 +0000 (16:32 +0800)
committericzc <iczcalan@gmail.com>
Fri, 26 Jul 2019 08:32:10 +0000 (16:32 +0800)
toolbar/consensusreward/consensusreward.go

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