mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 12:01:20 +00:00
try drop in-mem buf after flush
This commit is contained in:
parent
677c0169aa
commit
e52119f359
@ -515,8 +515,8 @@ var PoolPendingBaseFeeKey = []byte("pending_base_fee")
|
|||||||
var PoolProtocolBaseFeeKey = []byte("protocol_base_fee")
|
var PoolProtocolBaseFeeKey = []byte("protocol_base_fee")
|
||||||
|
|
||||||
func (sc *SendersCache) flush(tx kv.RwTx) error {
|
func (sc *SendersCache) flush(tx kv.RwTx) error {
|
||||||
sc.lock.RLock()
|
sc.lock.Lock()
|
||||||
defer sc.lock.RUnlock()
|
defer sc.lock.Unlock()
|
||||||
encID := make([]byte, 8)
|
encID := make([]byte, 8)
|
||||||
for addr, id := range sc.senderIDs {
|
for addr, id := range sc.senderIDs {
|
||||||
binary.BigEndian.PutUint64(encID, id)
|
binary.BigEndian.PutUint64(encID, id)
|
||||||
@ -553,7 +553,7 @@ func (sc *SendersCache) flush(tx kv.RwTx) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sc.senderIDs = map[string]uint64{}
|
sc.senderInfo = map[uint64]*senderInfo{}
|
||||||
|
|
||||||
binary.BigEndian.PutUint64(encID, sc.blockHeight.Load())
|
binary.BigEndian.PutUint64(encID, sc.blockHeight.Load())
|
||||||
if err := tx.Put(kv.PoolInfo, SenderCacheHeightKey, encID); err != nil {
|
if err := tx.Put(kv.PoolInfo, SenderCacheHeightKey, encID); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user