|
|
|
@ -168,7 +168,7 @@ func (tx *Transaction) DecodeRLP(s *rlp.Stream) error { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnmarshalBinary decodes the canonical encoding of transactions.
|
|
|
|
|
// It supports legacy RLP transactions and EIP2718 typed transactions.
|
|
|
|
|
// It supports legacy RLP transactions and EIP-2718 typed transactions.
|
|
|
|
|
func (tx *Transaction) UnmarshalBinary(b []byte) error { |
|
|
|
|
if len(b) > 0 && b[0] > 0x7f { |
|
|
|
|
// It's a legacy transaction.
|
|
|
|
@ -180,7 +180,7 @@ func (tx *Transaction) UnmarshalBinary(b []byte) error { |
|
|
|
|
tx.setDecoded(&data, uint64(len(b))) |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
// It's an EIP2718 typed transaction envelope.
|
|
|
|
|
// It's an EIP-2718 typed transaction envelope.
|
|
|
|
|
inner, err := tx.decodeTyped(b) |
|
|
|
|
if err != nil { |
|
|
|
|
return err |
|
|
|
@ -395,7 +395,7 @@ func (tx *Transaction) BlobGasFeeCap() *big.Int { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// BlobHashes returns the hases of the blob commitments for blob transactions, nil otherwise.
|
|
|
|
|
// BlobHashes returns the hashes of the blob commitments for blob transactions, nil otherwise.
|
|
|
|
|
func (tx *Transaction) BlobHashes() []common.Hash { |
|
|
|
|
if blobtx, ok := tx.inner.(*BlobTx); ok { |
|
|
|
|
return blobtx.BlobHashes |
|
|
|
|