diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-04 17:14:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | c3c28075a73f7e1f55e82d3cf59f2f064967fdf1 (patch) | |
tree | b7f57946c5a1ec0abcc35a34e752ca53bfdb5ad0 | |
parent | 9a8e616df90409e1a94b7843d1ceddcf010bc11b (diff) | |
download | go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.gz go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.zst go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.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) |