OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add get-blocker api (#173)
[bytom/vapor.git]
/
api
/
bbft.go
diff --git
a/api/bbft.go
b/api/bbft.go
index
83cad1e
..
46f2239
100644
(file)
--- a/
api/bbft.go
+++ b/
api/bbft.go
@@
-12,9
+12,10
@@
type voteInfo struct {
}
type voteInfoSlice []*voteInfo
}
type voteInfoSlice []*voteInfo
-func (v voteInfoSlice) Len() int { return len(v) }
+
+func (v voteInfoSlice) Len() int { return len(v) }
func (v voteInfoSlice) Less(i, j int) bool { return v[i].VoteNum > v[j].VoteNum }
func (v voteInfoSlice) Less(i, j int) bool { return v[i].VoteNum > v[j].VoteNum }
-func (v voteInfoSlice) Swap(i, j int) { v[i], v[j] = v[j], v[i] }
+func (v voteInfoSlice) Swap(i, j int)
{ v[i], v[j] = v[j], v[i] }
func (a *API) getVoteResult(req struct {
BlockHash chainjson.HexBytes `json:"block_hash"`
func (a *API) getVoteResult(req struct {
BlockHash chainjson.HexBytes `json:"block_hash"`