Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Jul 30, 2023
1 parent b10d7b0 commit 740add6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion contracts/src/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ contract Gateway is IGateway, IInitializable {
}

// Increment nonce for origin.
// This also prevents the re-entrancy case in which a malicous party tries to re-enter by calling `submitInbound`
// This also prevents the re-entrancy case in which a malicious party tries to re-enter by calling `submitInbound`
// again with the same (message, leafProof, headerProof) arguments.
channel.inboundNonce++;

Expand Down
2 changes: 1 addition & 1 deletion parachain/pallets/inbound-queue/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mod benchmarks {

// Make sure the sovereign balance is enough. This is a funny number, because
// in some cases the minimum balance is really high, in other cases very low.
// e.g. on bridgehub the minium balance is 33333, on test it is 1. So this equation makes
// e.g. on bridgehub the minimum balance is 33333, on test it is 1. So this equation makes
// it is at least twice the minimum balance (so as to satisfy the minimum balance
// requirement, and then some (in case the minimum balance is very low, even lower
// than the relayer reward fee).
Expand Down
19 changes: 9 additions & 10 deletions smoketest/tests/upgrade_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async fn upgrade_gateway() {
.expect("sudo call success");

println!(
"sudo call issued at relaychain block hash {:?}",
"Sudo call issued at relaychain block hash {:?}",
result.block_hash()
);

Expand All @@ -142,7 +142,7 @@ async fn upgrade_gateway() {
.expect("block subscription")
.take(wait_for_blocks);

let mut event_found = false;
let mut upgrade_event_found = false;
while let Some(Ok(block)) = blocks.next().await {
println!(
"Polling bridgehub block {} for upgrade event.",
Expand All @@ -158,14 +158,13 @@ async fn upgrade_gateway() {
);
assert_eq!(upgrade.params_hash, Some(params_hash.into()));
println!("Event found at bridgehub block {}.", block.number());
event_found = true;
break;
upgrade_event_found = true;
}
if event_found {
if upgrade_event_found {
break;
}
}
assert!(event_found);
assert!(upgrade_event_found);

let wait_for_blocks = 30;
let mut stream = ethereum_client
Expand All @@ -188,22 +187,22 @@ async fn upgrade_gateway() {
.await
{
for upgrade in upgrades {
println!("Upgrade found at ethereum block {:?}", block.number.unwrap());
println!("Upgrade event found at ethereum block {:?}", block.number.unwrap());
assert_eq!(
upgrade.implementation,
GATETWAY_UPGRADE_MOCK_CONTRACT.into()
);
upgrade_event_found = true;
}
if upgrade_event_found {
if let Ok(initilizes) = mock_gateway
if let Ok(initializes) = mock_gateway
.event::<InitializedFilter>()
.at_block_hash(block.hash.unwrap())
.query()
.await
{
for initialize in initilizes {
println!("Initialize found at ethereum block {:?}", block.number.unwrap());
for initialize in initializes {
println!("Initialize event found at ethereum block {:?}", block.number.unwrap());
assert_eq!(initialize.d_0, d_0.into());
assert_eq!(initialize.d_1, d_1.into());
initialize_event_found = true;
Expand Down

0 comments on commit 740add6

Please sign in to comment.