aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-01-04 17:14:00 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:50:00 +0800
commit5eb6b079afcc0cf2194274f02fce85aa3e8f3d35 (patch)
tree7485ccc1924226fc8114790ad334502811bdfe06
parentf495bf1f38b8a4559ded262a21497e7252785208 (diff)
downloaddexon-5eb6b079afcc0cf2194274f02fce85aa3e8f3d35.tar.gz
dexon-5eb6b079afcc0cf2194274f02fce85aa3e8f3d35.tar.zst
dexon-5eb6b079afcc0cf2194274f02fce85aa3e8f3d35.zip
dex: fix cache error (#126)
-rw-r--r--dex/cache.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/dex/cache.go b/dex/cache.go
index bdc22e114..5d4d20dd0 100644
--- a/dex/cache.go
+++ b/dex/cache.go
@@ -71,6 +71,7 @@ func (c *cache) addVote(vote *coreTypes.Vote) {
pos := c.votePosition[0]
c.voteSize -= len(c.voteCache[pos])
delete(c.voteCache, pos)
+ c.votePosition = c.votePosition[1:]
}
if _, exist := c.voteCache[vote.Position]; !exist {
c.votePosition = append(c.votePosition, vote.Position)