Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haider-rs committed Apr 17, 2024
1 parent b6ffd40 commit 0a50301
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions chains/astar/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ impl AstarClient {

// Verify if the ethereum block hash matches the provided ethereum block hash.
// TODO: compute the block hash
if U256(actual_eth_block.header.number.0) !=
U256::from(ethereum_block.header().number())
if U256(actual_eth_block.header.number.0)
!= U256::from(ethereum_block.header().number())
{
anyhow::bail!("ethereum block hash mismatch");
}
if actual_eth_block.header.parent_hash.as_fixed_bytes() !=
&ethereum_block.header().header().parent_hash.0
if actual_eth_block.header.parent_hash.as_fixed_bytes()
!= &ethereum_block.header().header().parent_hash.0
{
anyhow::bail!("ethereum block hash mismatch");
}
Expand Down Expand Up @@ -432,7 +432,7 @@ mod tests {
.query(GetLogs {
contracts: vec![contract_address],
topics: vec![topic],
block: AtBlock::At(block_hash.into()),
block: AtBlock::At(block_hash.into()).into(),
})
.await
.unwrap();
Expand All @@ -443,7 +443,7 @@ mod tests {
.query(GetLogs {
contracts: vec![contract_address],
topics: vec![topic],
block: AtBlock::At(block_number.into()),
block: AtBlock::At(block_number.into()).into(),
})
.await
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions chains/ethereum/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ mod tests {
.query(GetLogs {
contracts: vec![contract_address],
topics: vec![topic],
block: AtBlock::At(block_hash.into()),
block: AtBlock::At(block_hash.into()).into(),
})
.await
.unwrap();
Expand All @@ -351,7 +351,7 @@ mod tests {
.query(GetLogs {
contracts: vec![contract_address],
topics: vec![topic],
block: AtBlock::At(block_number.into()),
block: AtBlock::At(block_number.into()).into(),
})
.await
.unwrap();
Expand Down

0 comments on commit 0a50301

Please sign in to comment.