mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
core/txpool: move cell validation outside of lock
This commit is contained in:
parent
f7cd5a0579
commit
41e966c2b5
1 changed files with 4 additions and 4 deletions
|
|
@ -1965,6 +1965,10 @@ func (p *BlobPool) Add(txs []*types.Transaction, sync bool) []error {
|
||||||
errs[i] = err
|
errs[i] = err
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if err := txpool.ValidateCells(ptx.CellSidecar); err != nil {
|
||||||
|
errs[i] = err
|
||||||
|
continue
|
||||||
|
}
|
||||||
errs[i] = p.AddPooledTx(ptx)
|
errs[i] = p.AddPooledTx(ptx)
|
||||||
}
|
}
|
||||||
return errs
|
return errs
|
||||||
|
|
@ -2034,10 +2038,6 @@ func (p *BlobPool) addLocked(ptx *BlobTxForPool, checkGapped bool) (err error) {
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//todo: validation happens twice for eth72
|
|
||||||
if err := txpool.ValidateCells(ptx.CellSidecar); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// If the address is not yet known, request exclusivity to track the account
|
// If the address is not yet known, request exclusivity to track the account
|
||||||
// only by this subpool until all transactions are evicted
|
// only by this subpool until all transactions are evicted
|
||||||
from, _ := types.Sender(p.signer, tx) // already validated above
|
from, _ := types.Sender(p.signer, tx) // already validated above
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue