diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-04 17:14:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:55 +0800 |
commit | 9db3e9124a4153cd45e8444bd844efcd3955e38d (patch) | |
tree | 6386c6afb26d28ed981ffea3df0a63d276293c7c | |
parent | 4902142388ec53dc8f1a33fee88ff3e31a5aed84 (diff) | |
download | dexon-9db3e9124a4153cd45e8444bd844efcd3955e38d.tar.gz dexon-9db3e9124a4153cd45e8444bd844efcd3955e38d.tar.zst dexon-9db3e9124a4153cd45e8444bd844efcd3955e38d.zip |
dex: fix cache error (#126)
-rw-r--r-- | dex/cache.go | 1 |
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) |