Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Sep 24, 2024
1 parent ebdcce1 commit 0f5343d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bridges/snowbridge/pallets/ethereum-client/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
load_next_sync_committee_update_fixture, load_sync_committee_update_fixture,
},
sync_committee_sum, verify_merkle_branch, BeaconHeader, CompactBeaconState, Error,
FinalizedBeaconState, LatestFinalizedBlockRoot, LatestFreeSyncCommitteeUpdatePeriod,
FinalizedBeaconState, LatestFinalizedBlockRoot, LatestSyncCommitteeUpdatePeriod,
NextSyncCommittee, SyncCommitteePrepared,
};
use frame_support::{assert_err, assert_noop, assert_ok, pallet_prelude::Pays};
Expand Down Expand Up @@ -726,27 +726,27 @@ fn sync_committee_update_for_sync_committee_already_imported_are_not_free() {

new_tester().execute_with(|| {
assert_ok!(EthereumBeaconClient::process_checkpoint_update(&checkpoint));
assert_eq!(<LatestFreeSyncCommitteeUpdatePeriod<Test>>::get(), 0);
assert_eq!(<LatestSyncCommitteeUpdatePeriod<Test>>::get(), 0);

// Check that setting the next sync committee for period 0 is free (it is not set yet).
let result =
EthereumBeaconClient::submit(RuntimeOrigin::signed(1), sync_committee_update.clone());
assert_ok!(result);
assert_eq!(result.unwrap().pays_fee, Pays::No);
assert_eq!(<LatestFreeSyncCommitteeUpdatePeriod<Test>>::get(), 0);
assert_eq!(<LatestSyncCommitteeUpdatePeriod<Test>>::get(), 0);

// Check that setting the next sync committee for period 0 again is not free.
let second_result =
EthereumBeaconClient::submit(RuntimeOrigin::signed(1), second_sync_committee_update);
assert_eq!(second_result.unwrap().pays_fee, Pays::Yes);
assert_eq!(<LatestFreeSyncCommitteeUpdatePeriod<Test>>::get(), 0);
assert_eq!(<LatestSyncCommitteeUpdatePeriod<Test>>::get(), 0);

// Check that setting an update with a sync committee that has already been set, but with a
// newer finalized header, is free.
let third_result =
EthereumBeaconClient::submit(RuntimeOrigin::signed(1), third_sync_committee_update);
assert_eq!(third_result.unwrap().pays_fee, Pays::No);
assert_eq!(<LatestFreeSyncCommitteeUpdatePeriod<Test>>::get(), 0);
assert_eq!(<LatestSyncCommitteeUpdatePeriod<Test>>::get(), 0);

// Check that setting the next sync committee for period 0 again with an earlier slot is not
// free.
Expand All @@ -759,7 +759,7 @@ fn sync_committee_update_for_sync_committee_already_imported_are_not_free() {
let fith_result =
EthereumBeaconClient::submit(RuntimeOrigin::signed(1), fith_sync_committee_update);
assert_eq!(fith_result.unwrap().pays_fee, Pays::No);
assert_eq!(<LatestFreeSyncCommitteeUpdatePeriod<Test>>::get(), 1);
assert_eq!(<LatestSyncCommitteeUpdatePeriod<Test>>::get(), 1);
});
}

Expand Down

0 comments on commit 0f5343d

Please sign in to comment.