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:
f3cb5b1
)
fix vote result (#186)
author
muscle_boy
<shenao.78@163.com>
Mon, 17 Jun 2019 12:00:35 +0000
(20:00 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Mon, 17 Jun 2019 12:00:35 +0000
(20:00 +0800)
database/cache.go
patch
|
blob
|
history
diff --git
a/database/cache.go
b/database/cache.go
index
01366a1
..
7668d9c
100644
(file)
--- a/
database/cache.go
+++ b/
database/cache.go
@@
-98,7
+98,7
@@
func (c *blockCache) lookupBlockTxs(hash *bc.Hash) ([]*types.Tx, error) {
func (c *blockCache) lookupVoteResult(seq uint64) (*state.VoteResult, error) {
if vr, ok := c.getVoteResult(seq); ok {
- return vr, nil
+ return vr
.Fork()
, nil
}
seqStr := strconv.FormatUint(seq, 10)
@@
-118,7
+118,7
@@
func (c *blockCache) lookupVoteResult(seq uint64) (*state.VoteResult, error) {
if err != nil {
return nil, err
}
- return voteResult.(*state.VoteResult), nil
+ return voteResult.(*state.VoteResult)
.Fork()
, nil
}
func (c *blockCache) getBlockHeader(hash *bc.Hash) (*types.BlockHeader, bool) {