diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-03 01:22:19 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:49:56 +0800 |
commit | 543b8cddaa0ed69dcec5d801125ff43b86cc030d (patch) | |
tree | 378e893673f52254a14241ea5b63fbb8cb9c8d4d /dex/cache.go | |
parent | ab3d4ad2199a5904d1dd1c522944ef13e3632a2f (diff) | |
download | dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar.gz dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar.bz2 dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar.lz dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar.xz dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.tar.zst dexon-543b8cddaa0ed69dcec5d801125ff43b86cc030d.zip |
dex: remove finalization information in block cache
Diffstat (limited to 'dex/cache.go')
-rw-r--r-- | dex/cache.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dex/cache.go b/dex/cache.go index e56e706f9..96ba2d765 100644 --- a/dex/cache.go +++ b/dex/cache.go @@ -92,6 +92,8 @@ func (c *cache) votes(pos coreTypes.Position) []*coreTypes.Vote { func (c *cache) addBlock(block *coreTypes.Block) { c.lock.Lock() defer c.lock.Unlock() + block = block.Clone() + block.Finalization.Height = 0 if len(c.blockCache) >= c.size { // Randomly delete one entry. for k := range c.blockCache { |