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:
db01c29
)
fix detach vote (#164)
author
muscle_boy
<shenao.78@163.com>
Wed, 12 Jun 2019 08:16:23 +0000
(16:16 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Wed, 12 Jun 2019 08:16:23 +0000
(16:16 +0800)
protocol/state/vote_result.go
patch
|
blob
|
history
diff --git
a/protocol/state/vote_result.go
b/protocol/state/vote_result.go
index
129f3a3
..
e241bcf
100644
(file)
--- a/
protocol/state/vote_result.go
+++ b/
protocol/state/vote_result.go
@@
-120,7
+120,8
@@
func (v *VoteResult) DetachBlock(block *types.Block) error {
return errors.New("block hash is not equals last block hash of vote result")
}
- for _, tx := range block.Transactions {
+ for i := len(block.Transactions) - 1; i >= 0; i-- {
+ tx := block.Transactions[i]
for _, input := range tx.Inputs {
unVoteInput, ok := input.TypedInput.(*types.UnvoteInput)
if !ok {