Skip to content

Commit

Permalink
pending block: auto fallback to old runtime api if it fail
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Nov 27, 2023
1 parent bba7443 commit bf5885a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/rpc/src/eth/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ where
);

// Initialize the pending block header
//match api.api_version::<dyn EthereumRuntimeRPCApi<B>>(best_hash)? {
//Some(version) if version >= 6 => {
api.initialize_pending_block(best_hash, &pending_header)?;
//}
//_ => api.initialize_block(best_hash, &pending_header)?,
//}
if api
.initialize_pending_block(best_hash, &pending_header)
.is_err()
{
api.initialize_block(best_hash, &pending_header)?
}

// Apply inherents to the pending block.
let inherents = api.execute_in_transaction(move |api| {
Expand Down

0 comments on commit bf5885a

Please sign in to comment.