OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef94068
)
update
author
iczc
<iczcalan@gmail.com>
Fri, 26 Jul 2019 08:48:48 +0000
(16:48 +0800)
committer
iczc
<iczcalan@gmail.com>
Fri, 26 Jul 2019 08:48:48 +0000
(16:48 +0800)
toolbar/consensusreward/consensusreward.go
patch
|
blob
|
history
diff --git
a/toolbar/consensusreward/consensusreward.go
b/toolbar/consensusreward/consensusreward.go
index
ab0b98f
..
783c398
100644
(file)
--- a/
toolbar/consensusreward/consensusreward.go
+++ b/
toolbar/consensusreward/consensusreward.go
@@
-1,6
+1,7
@@
package consensusreward
import (
package consensusreward
import (
+ "fmt"
"math/big"
"github.com/vapor/consensus"
"math/big"
"github.com/vapor/consensus"
@@
-31,6
+32,7
@@
func NewStandbyNodeReward(cfg *config.Config, startHeight, endHeight uint64) *St
}
func (s *StandbyNodeReward) getStandbyNodeReward(height uint64) error {
}
func (s *StandbyNodeReward) getStandbyNodeReward(height uint64) error {
+ fmt.Println(height)
voteInfos, err := s.node.GetVoteByHeight(height)
if err != nil {
return errors.Wrapf(err, "get alternative node reward")
voteInfos, err := s.node.GetVoteByHeight(height)
if err != nil {
return errors.Wrapf(err, "get alternative node reward")
@@
-52,8
+54,8
@@
func (s *StandbyNodeReward) getStandbyNodeReward(height uint64) error {
}
func (s *StandbyNodeReward) Settlement() error {
}
func (s *StandbyNodeReward) Settlement() error {
- for height := s.startHeight
; height <
s.endHeight; height += consensus.ActiveNetParams.RoundVoteBlockNums {
- if err := s.getStandbyNodeReward(height); err != nil {
+ 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
}
}
return err
}
}