mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
Apply suggestion from @s1na
This commit is contained in:
parent
6d415ae79a
commit
e252f442e6
1 changed files with 0 additions and 2 deletions
|
|
@ -322,8 +322,6 @@ func (tx *Transaction) Cost() *big.Int {
|
||||||
total.Mul(total, tx.inner.gasPrice())
|
total.Mul(total, tx.inner.gasPrice())
|
||||||
if blobtx, ok := tx.inner.(*BlobTx); ok {
|
if blobtx, ok := tx.inner.(*BlobTx); ok {
|
||||||
tmp := new(big.Int).SetUint64(blobtx.blobGas())
|
tmp := new(big.Int).SetUint64(blobtx.blobGas())
|
||||||
// BlobFeeCap is uint256.Int; ToBig allocates, but blob txs are rarer and
|
|
||||||
// this still removes several other allocations compared to the old code.
|
|
||||||
tmp.Mul(tmp, blobtx.BlobFeeCap.ToBig())
|
tmp.Mul(tmp, blobtx.BlobFeeCap.ToBig())
|
||||||
total.Add(total, tmp)
|
total.Add(total, tmp)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue