Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fixes type
Browse files Browse the repository at this point in the history
  • Loading branch information
gupnik committed Jun 20, 2023
1 parent 60bd4c6 commit dc946ad
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frame/fast-unstake/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ impl ExtBuilder {
}
}

pub(crate) fn run_to_block(n: u64, on_idle: bool) {
pub(crate) fn run_to_block(n: u32, on_idle: bool) {
let current_block = System::block_number();
assert!(n > current_block);
while System::block_number() < n {
Expand Down
2 changes: 1 addition & 1 deletion frame/lottery/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
}

/// Run until a particular block.
pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
while System::block_number() < n {
if System::block_number() > 1 {
Lottery::on_finalize(System::block_number());
Expand Down
2 changes: 1 addition & 1 deletion frame/nis/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub fn new_test_ext_empty() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into()
}

pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
while System::block_number() < n {
Nis::on_finalize(System::block_number());
Balances::on_finalize(System::block_number());
Expand Down
4 changes: 2 additions & 2 deletions frame/nomination-pools/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,13 @@ parameter_types! {
}

/// Helper to run a specified amount of blocks.
pub fn run_blocks(n: u64) {
pub fn run_blocks(n: u32) {
let current_block = System::block_number();
run_to_block(n + current_block);
}

/// Helper to run to a specific block.
pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
let current_block = System::block_number();
assert!(n > current_block);
while System::block_number() < n {
Expand Down
2 changes: 1 addition & 1 deletion frame/recovery/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
}

/// Run until a particular block.
pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
while System::block_number() < n {
if System::block_number() > 1 {
System::on_finalize(System::block_number());
Expand Down
2 changes: 1 addition & 1 deletion frame/scheduler/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
t.into()
}

pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
while System::block_number() < n {
Scheduler::on_finalize(System::block_number());
System::set_block_number(System::block_number() + 1);
Expand Down
2 changes: 1 addition & 1 deletion frame/society/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl EnvBuilder {
}

/// Run until a particular block.
pub fn run_to_block(n: u64) {
pub fn run_to_block(n: u32) {
while System::block_number() < n {
if System::block_number() > 1 {
System::on_finalize(System::block_number());
Expand Down
2 changes: 1 addition & 1 deletion frame/transaction-storage/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
t.into()
}

pub fn run_to_block(n: u64, f: impl Fn() -> Option<TransactionStorageProof>) {
pub fn run_to_block(n: u32, f: impl Fn() -> Option<TransactionStorageProof>) {
while System::block_number() < n {
if let Some(proof) = f() {
TransactionStorage::check_proof(RuntimeOrigin::none(), proof).unwrap();
Expand Down

0 comments on commit dc946ad

Please sign in to comment.