diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-04 17:14:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-01-14 15:26:26 +0800 |
commit | 9d53dfe2602d8b2203ac437281bb1567426a17d8 (patch) | |
tree | 451e3952fede964e487aff5f82726ac1e8c9e52d /dex | |
parent | 7e4572225b5985f846503abbcb960fc5a2854359 (diff) | |
download | dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar.gz dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar.bz2 dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar.lz dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar.xz dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.tar.zst dexon-9d53dfe2602d8b2203ac437281bb1567426a17d8.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) |