From 677c0169aae0c475561d4fb071456fb45163c798 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 26 Aug 2021 15:14:02 +0700 Subject: [PATCH] try drop in-mem buf after flush --- txpool/pool.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/txpool/pool.go b/txpool/pool.go index 06a512596..7f5e3891a 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -535,6 +535,7 @@ func (sc *SendersCache) flush(tx kv.RwTx) error { return err } } + sc.senderIDs = map[string]uint64{} v := make([]byte, 8, 8+32) for id, info := range sc.senderInfo { @@ -552,6 +553,7 @@ func (sc *SendersCache) flush(tx kv.RwTx) error { return err } } + sc.senderIDs = map[string]uint64{} binary.BigEndian.PutUint64(encID, sc.blockHeight.Load()) if err := tx.Put(kv.PoolInfo, SenderCacheHeightKey, encID); err != nil {