aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-01-04 17:14:00 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commitc3c28075a73f7e1f55e82d3cf59f2f064967fdf1 (patch)
treeb7f57946c5a1ec0abcc35a34e752ca53bfdb5ad0 /dex
parent9a8e616df90409e1a94b7843d1ceddcf010bc11b (diff)
downloadgo-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.gz
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.bz2
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.lz
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.xz
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.tar.zst
go-tangerine-c3c28075a73f7e1f55e82d3cf59f2f064967fdf1.zip
dex: fix cache error (#126)
Diffstat (limited to 'dex')
-rw-r--r--dex/cache.go1
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)