mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: return enveloped encoded (#5156)
This commit is contained in:
@ -897,13 +897,10 @@ where
|
||||
/// Returns the bytes of the transaction for the given hash.
|
||||
async fn raw_transaction(&self, hash: B256) -> RpcResult<Bytes> {
|
||||
let tx = self.inner.eth_api.transaction_by_hash(hash).await?;
|
||||
|
||||
let mut res = Vec::new();
|
||||
if let Some(tx) = tx.map(TransactionSource::into_recovered) {
|
||||
tx.encode(&mut res);
|
||||
}
|
||||
|
||||
Ok(res.into())
|
||||
Ok(tx
|
||||
.map(TransactionSource::into_recovered)
|
||||
.map(|tx| tx.envelope_encoded())
|
||||
.unwrap_or_default())
|
||||
}
|
||||
|
||||
/// Handler for `debug_getRawReceipts`
|
||||
|
||||
Reference in New Issue
Block a user