From 7f22a589ed25f67779e3b2eb11fabad66cb9fa2c Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Fri, 4 Jan 2019 17:14:00 +0800 Subject: dex: fix cache error (#126) --- dex/cache.go | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.3