OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Mon, 17 Jun 2019 10:41:29 +0000 (18:41 +0800)
committerChengcheng Zhang <943420582@qq.com>
Mon, 17 Jun 2019 10:41:29 +0000 (18:41 +0800)
database/store.go

index 59955eb..3af6338 100644 (file)
@@ -321,7 +321,8 @@ func (s *Store) SaveChainStatus(node, irreversibleNode *state.BlockNode, view *s
                if err != nil {
                        return err
                }
-               s.db.Set(calcVoteResultKey(vote.Seq), bytes)
+
+               batch.Set(calcVoteResultKey(vote.Seq), bytes)
                if _, ok := s.cache.getVoteResult(vote.Seq); ok {
                        s.cache.addVoteResult(vote)
                }