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
(from parent 1:
ee36412
)
fix bug (#160)
author
Paladz
<yzhu101@uottawa.ca>
Wed, 12 Jun 2019 05:50:32 +0000
(13:50 +0800)
committer
GitHub
<noreply@github.com>
Wed, 12 Jun 2019 05:50:32 +0000
(13:50 +0800)
* fix bug
* fix bug
protocol/consensus_node_manager.go
patch
|
blob
|
history
diff --git
a/protocol/consensus_node_manager.go
b/protocol/consensus_node_manager.go
index
a941860
..
136fb6a
100644
(file)
--- a/
protocol/consensus_node_manager.go
+++ b/
protocol/consensus_node_manager.go
@@
-106,10
+106,15
@@
func (c *consensusNodeManager) getConsensusNodes(prevBlockHash *bc.Hash) (map[st
return nil, err
}
- if len(voteResult.NumOfVote) == 0 {
- return federationNodes(), nil
+ result, err := voteResult.ConsensusNodes()
+ if err != nil {
+ return nil, err
+ }
+
+ if len(result) != 0 {
+ return result, nil
}
- return
voteResult.ConsensusNodes()
+ return
federationNodes(), nil
}
func (c *consensusNodeManager) getBestVoteResult() (*state.VoteResult, error) {