mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix some carps in blobpool
This commit is contained in:
parent
663fa7b496
commit
dbc087541f
1 changed files with 5 additions and 5 deletions
|
|
@ -116,7 +116,7 @@ func (l *limbo) finalize(final *types.Header) {
|
||||||
// Just in case there's no final block yet (network not yet merged, weird
|
// Just in case there's no final block yet (network not yet merged, weird
|
||||||
// restart, sethead, etc), fail gracefully.
|
// restart, sethead, etc), fail gracefully.
|
||||||
if final == nil {
|
if final == nil {
|
||||||
log.Error("Nil finalized block cannot evict old blobs")
|
log.Warn("Nil finalized block cannot evict old blobs")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for block, ids := range l.groups {
|
for block, ids := range l.groups {
|
||||||
|
|
@ -139,11 +139,11 @@ func (l *limbo) push(tx *types.Transaction, block uint64) error {
|
||||||
// If the blobs are already tracked by the limbo, consider it a programming
|
// If the blobs are already tracked by the limbo, consider it a programming
|
||||||
// error. There's not much to do against it, but be loud.
|
// error. There's not much to do against it, but be loud.
|
||||||
if _, ok := l.index[tx.Hash()]; ok {
|
if _, ok := l.index[tx.Hash()]; ok {
|
||||||
log.Error("Limbo cannot push already tracked blobs", "tx", tx)
|
log.Error("Limbo cannot push already tracked blobs", "hash", tx.Hash())
|
||||||
return errors.New("already tracked blob transaction")
|
return errors.New("already tracked blob transaction")
|
||||||
}
|
}
|
||||||
if err := l.setAndIndex(tx, block); err != nil {
|
if err := l.setAndIndex(tx, block); err != nil {
|
||||||
log.Error("Failed to set and index limboed blobs", "tx", tx, "err", err)
|
log.Error("Failed to set and index limboed blobs", "hash", tx.Hash(), "err", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -158,12 +158,12 @@ func (l *limbo) pull(tx common.Hash) (*types.Transaction, error) {
|
||||||
// into the network first.
|
// into the network first.
|
||||||
id, ok := l.index[tx]
|
id, ok := l.index[tx]
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Trace("Limbo cannot pull non-tracked blobs", "tx", tx)
|
log.Trace("Limbo cannot pull non-tracked blobs", "hash", tx)
|
||||||
return nil, errors.New("unseen blob transaction")
|
return nil, errors.New("unseen blob transaction")
|
||||||
}
|
}
|
||||||
item, err := l.getAndDrop(id)
|
item, err := l.getAndDrop(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to get and drop limboed blobs", "tx", tx, "id", id, "err", err)
|
log.Error("Failed to get and drop limboed blobs", "hash", tx, "id", id, "err", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return item.Tx, nil
|
return item.Tx, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue