Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
- Add state overrides to arbitrum.EstimateGas
- Non-functional change to EncodeIndex to avoid future merge conflicts.
  • Loading branch information
Tristan-Wilson committed Nov 13, 2023
1 parent 890cbca commit be1fd29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arbitrum/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

type TransactionArgs = ethapi.TransactionArgs

func EstimateGas(ctx context.Context, b ethapi.Backend, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, gasCap uint64) (hexutil.Uint64, error) {
return ethapi.DoEstimateGas(ctx, b, args, blockNrOrHash, nil, gasCap)
func EstimateGas(ctx context.Context, b ethapi.Backend, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *ethapi.StateOverride, gasCap uint64) (hexutil.Uint64, error) {
return ethapi.DoEstimateGas(ctx, b, args, blockNrOrHash, overrides, gasCap)
}

func NewRevertReason(result *core.ExecutionResult) error {
Expand Down
6 changes: 5 additions & 1 deletion core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,14 @@ func (rs Receipts) EncodeIndex(i int, w *bytes.Buffer) {
switch r.Type {
case AccessListTxType, DynamicFeeTxType, BlobTxType:
rlp.Encode(w, data)
default:
case ArbitrumDepositTxType, ArbitrumUnsignedTxType, ArbitrumContractTxType, ArbitrumRetryTxType, ArbitrumSubmitRetryableTxType, ArbitrumInternalTxType:
// Arbitrum: same as above, but this should help prevent future merge conflicts,
// by keeping above case statement the same.
rlp.Encode(w, data)
default:
// For unsupported types, write nothing. Since this is for
// DeriveSha, the error will be caught matching the derived hash
// to the block.
}
}

Expand Down

0 comments on commit be1fd29

Please sign in to comment.