Skip to content

Commit

Permalink
Get substrate hash vs the whole BlockInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
elfedy committed Jan 9, 2024
1 parent 25be8e7 commit 1b510e4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions client/rpc/src/eth/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ where
EthereumTransaction::EIP2930(t) => t.gas_price,
EthereumTransaction::EIP1559(t) => {
let parent_eth_hash = block.header.parent_hash;
let parent_substrate_hash = self
.block_info_by_eth_block_hash(parent_eth_hash)
.await?
.substrate_hash;
let parent_substrate_hash = frontier_backend_client::load_hash::<B, C>(
self.client.as_ref(),
self.backend.as_ref(),
parent_eth_hash,
)
.await
.map_err(|err| internal_err(format!("{:?}", err)))?
.ok_or(internal_err("Failed to retrieve substrate block hash"))
.map_err(|err| internal_err(format!("{:?}", err)))?;

self.client
.runtime_api()
Expand Down

0 comments on commit 1b510e4

Please sign in to comment.