diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-04 17:14:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 7f22a589ed25f67779e3b2eb11fabad66cb9fa2c (patch) | |
tree | 5f0c246b2c9ce914d1bc84bba6eb06f29386ea2a /dex | |
parent | e3e6285c26b0816c02578071fd51e9177af6939f (diff) | |
download | dexon-7f22a589ed25f67779e3b2eb11fabad66cb9fa2c.tar.gz dexon-7f22a589ed25f67779e3b2eb11fabad66cb9fa2c.tar.zst dexon-7f22a589ed25f67779e3b2eb11fabad66cb9fa2c.zip |
dex: fix cache error (#126)
Diffstat (limited to 'dex')
-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) |