mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 11:32:20 +00:00
s
This commit is contained in:
parent
8e3fb676b2
commit
c98e650fca
@ -941,6 +941,7 @@ func (p *TxPool) AddNewGoodPeer(peerID PeerID) { p.recentlyConnectedPeers.AddPee
|
|||||||
func (p *TxPool) Started() bool { return p.protocolBaseFee.Load() > 0 }
|
func (p *TxPool) Started() bool { return p.protocolBaseFee.Load() > 0 }
|
||||||
|
|
||||||
func (p *TxPool) OnNewTxs(ctx context.Context, coreDB kv.RoDB, newTxs TxSlots, senders *SendersCache) error {
|
func (p *TxPool) OnNewTxs(ctx context.Context, coreDB kv.RoDB, newTxs TxSlots, senders *SendersCache) error {
|
||||||
|
defer func(t time.Time) { fmt.Printf("pool.go:944: %s\n", time.Since(t)) }(time.Now())
|
||||||
p.lock.Lock()
|
p.lock.Lock()
|
||||||
defer p.lock.Unlock()
|
defer p.lock.Unlock()
|
||||||
|
|
||||||
@ -957,6 +958,7 @@ func (p *TxPool) OnNewTxs(ctx context.Context, coreDB kv.RoDB, newTxs TxSlots, s
|
|||||||
if err := coreDB.View(ctx, func(tx kv.Tx) error { return senders.loadFromCore(tx, cacheMisses) }); err != nil {
|
if err := coreDB.View(ctx, func(tx kv.Tx) error { return senders.loadFromCore(tx, cacheMisses) }); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
fmt.Printf("misses:%d\n", len(cacheMisses))
|
||||||
}
|
}
|
||||||
if err := newTxs.Valid(); err != nil {
|
if err := newTxs.Valid(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user