Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit c7deb75

Browse files
committed
fix proper overflow handling
1 parent 6c5b1b5 commit c7deb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/ethapi/api.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2383,8 +2383,8 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st
23832383
if err != nil {
23842384
return nil, fmt.Errorf("err: %w; txhash %s", err, tx.Hash())
23852385
}
2386-
uint256GasPrice, ok := uint256.FromBig(gasPrice)
2387-
if !ok {
2386+
uint256GasPrice, overflow := uint256.FromBig(gasPrice)
2387+
if overflow {
23882388
return nil, fmt.Errorf("incorrect gasPrice txhash %s", tx.Hash())
23892389
}
23902390
gasFeesTx := new(uint256.Int).Mul(uint256.NewInt(receipt.GasUsed), uint256GasPrice)

0 commit comments

Comments
 (0)