mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/txpool/blobpool: fix rebase
This commit is contained in:
parent
fbc98ae50e
commit
e4e0c453e1
1 changed files with 11 additions and 3 deletions
|
|
@ -1724,11 +1724,19 @@ func (p *BlobPool) Clear() {
|
||||||
// manually iterating and deleting every entry is super sub-optimal
|
// manually iterating and deleting every entry is super sub-optimal
|
||||||
// However, Clear is not currently used in production so
|
// However, Clear is not currently used in production so
|
||||||
// performance is not critical at the moment.
|
// performance is not critical at the moment.
|
||||||
for _, entry := range p.lookup {
|
for hash := range p.lookup.txIndex {
|
||||||
if err := p.store.Delete(entry); err != nil {
|
id, _ := p.lookup.storeidOfTx(hash)
|
||||||
|
if err := p.store.Delete(id); err != nil {
|
||||||
log.Warn("failed to delete blob tx from backing store", "err", err)
|
log.Warn("failed to delete blob tx from backing store", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for hash := range p.lookup.blobIndex {
|
||||||
|
id, _ := p.lookup.storeidOfBlob(hash)
|
||||||
|
if err := p.store.Delete(id); err != nil {
|
||||||
|
log.Warn("failed to delete blob from backing store", "err", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// unreserve each tracked account. Ideally, we could just clear the
|
// unreserve each tracked account. Ideally, we could just clear the
|
||||||
// reservation map in the parent txpool context. However, if we clear in
|
// reservation map in the parent txpool context. However, if we clear in
|
||||||
// parent context, to avoid exposing the subpool lock, we have to lock the
|
// parent context, to avoid exposing the subpool lock, we have to lock the
|
||||||
|
|
@ -1746,7 +1754,7 @@ func (p *BlobPool) Clear() {
|
||||||
for acct, _ := range p.index {
|
for acct, _ := range p.index {
|
||||||
p.reserve(acct, false)
|
p.reserve(acct, false)
|
||||||
}
|
}
|
||||||
p.lookup = make(map[common.Hash]uint64)
|
p.lookup = newLookup()
|
||||||
p.index = make(map[common.Address][]*blobTxMeta)
|
p.index = make(map[common.Address][]*blobTxMeta)
|
||||||
p.spent = make(map[common.Address]*uint256.Int)
|
p.spent = make(map[common.Address]*uint256.Int)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue