rlp.EncodeToBytes => tx.MarshalBinary

This commit is contained in:
i-norden 2023-06-12 17:18:16 -05:00
parent 77f861dd95
commit ac67af63e1
2 changed files with 2 additions and 2 deletions

View File

@ -467,7 +467,7 @@ func (pea *PublicEthAPI) GetRawTransactionByHash(ctx context.Context, hash commo
// Retrieve a finalized transaction, or a pooled otherwise // Retrieve a finalized transaction, or a pooled otherwise
tx, _, _, _, err := pea.B.GetTransaction(ctx, hash) tx, _, _, _, err := pea.B.GetTransaction(ctx, hash)
if tx != nil && err == nil { if tx != nil && err == nil {
return rlp.EncodeToBytes(tx) return tx.MarshalBinary()
} }
if pea.config.ProxyOnError { if pea.config.ProxyOnError {
var tx hexutil.Bytes var tx hexutil.Bytes

View File

@ -275,7 +275,7 @@ func newRPCRawTransactionFromBlockIndex(b *types.Block, index uint64) hexutil.By
if index >= uint64(len(txs)) { if index >= uint64(len(txs)) {
return nil return nil
} }
blob, _ := rlp.EncodeToBytes(txs[index]) blob, _ := txs[index].MarshalBinary()
return blob return blob
} }