We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1a53d4 commit 1a74d9aCopy full SHA for 1a74d9a
core/types/transaction.go
@@ -184,6 +184,9 @@ func (tx *Transaction) encodeTyped(w *bytes.Buffer) error {
184
// For legacy transactions, it returns the RLP encoding. For EIP-2718 typed
185
// transactions, it returns the type and payload.
186
func (tx *Transaction) MarshalBinary() ([]byte, error) {
187
+ if tx.inner == nil {
188
+ return nil, fmt.Errorf("tx inner data is nil")
189
+ }
190
if tx.Type() == LegacyTxType {
191
return rlp.EncodeToBytes(tx.inner)
192
}
0 commit comments