Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed Mar 11, 2024
1 parent 807891c commit 986ad71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions core/lib/eth_client/src/clients/http/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,17 @@ impl EthInterface for QueryClient {
.web3
.eth()
.block(BlockId::Number(BlockNumber::Pending))
.await?
.expect("Pending block should always exist");
.await?;
let block = if let Some(block) = block {
block
} else {
// fallback for local testing
self.web3
.eth()
.block(BlockId::Number(BlockNumber::Latest))
.await?
.expect("Latest block should always exist")
};

latency.observe();
// base_fee_per_gas always exists after London fork
Expand Down
2 changes: 1 addition & 1 deletion core/tests/revert-test/tests/revert-and-restart-en.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('Block reverting test', function () {
if (lastCommitted.sub(lastExecuted).gte(2)) {
break;
}
await utils.sleep(1);
await utils.sleep(0.3);
}
const alice2 = await alice.getBalance();
console.log('Terminate the main node');
Expand Down

0 comments on commit 986ad71

Please sign in to comment.