Skip to content

Commit

Permalink
Merge pull request ethereum#174 from OffchainLabs/fix-decode-typed
Browse files Browse the repository at this point in the history
Don't accept ArbitrumLegacyTxType in decodeTyped
  • Loading branch information
PlasmaPower authored Oct 25, 2022
2 parents 423bb08 + 2e7a561 commit 5fac5a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ func (tx *Transaction) decodeTyped(b []byte, arbParsing bool) (TxData, error) {
var inner ArbitrumSubmitRetryableTx
err := rlp.DecodeBytes(b[1:], &inner)
return &inner, err
case ArbitrumLegacyTxType:
var inner ArbitrumLegacyTxData
err := rlp.DecodeBytes(b[1:], &inner)
return &inner, err
}
}
switch b[0] {
Expand All @@ -224,10 +228,6 @@ func (tx *Transaction) decodeTyped(b []byte, arbParsing bool) (TxData, error) {
var inner DynamicFeeTx
err := rlp.DecodeBytes(b[1:], &inner)
return &inner, err
case ArbitrumLegacyTxType:
var inner ArbitrumLegacyTxData
err := rlp.DecodeBytes(b[1:], &inner)
return &inner, err
default:
return nil, ErrTxTypeNotSupported
}
Expand Down

0 comments on commit 5fac5a2

Please sign in to comment.