rlp.EncodeToBytes => tx.MarshalBinary
This commit is contained in:
parent
77f861dd95
commit
ac67af63e1
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user