try drop in-mem buf after flush

This commit is contained in:
alex.sharov 2021-08-26 15:14:02 +07:00
parent c673625f37
commit 677c0169aa

View File

@ -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 {