From dbf3576f51cd9f9206a16e4b2820d07b6a23044d Mon Sep 17 00:00:00 2001 From: Nikita Khateev Date: Fri, 20 Sep 2024 13:05:42 +0400 Subject: [PATCH] Fix workflow versions (#317) --- .github/workflows/generic-weekly-fuzzer.yml | 4 ++-- evm-template/template-fuzzer/src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generic-weekly-fuzzer.yml b/.github/workflows/generic-weekly-fuzzer.yml index 89a5ad9..aa24103 100644 --- a/.github/workflows/generic-weekly-fuzzer.yml +++ b/.github/workflows/generic-weekly-fuzzer.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Rust uses: actions-rs/toolchain@v1 @@ -33,7 +33,7 @@ jobs: working-directory: generic-template/template-fuzzer - name: Save Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: fuzzing-artifacts path: | diff --git a/evm-template/template-fuzzer/src/main.rs b/evm-template/template-fuzzer/src/main.rs index 39aff5f..8c24481 100644 --- a/evm-template/template-fuzzer/src/main.rs +++ b/evm-template/template-fuzzer/src/main.rs @@ -113,7 +113,7 @@ fn process_input(accounts: &[AccountId], genesis: &Storage, data: &[u8]) { continue; } - let origin = accounts[origin_no].clone(); + let origin = accounts[origin_no]; println!("\n origin: {origin:?}"); println!(" call: {extrinsic:?}"); @@ -288,9 +288,9 @@ fn check_invariants(block: u32, initial_total_issuance: Balance) { counted_free += info.data.free; counted_reserved += info.data.reserved; let max_lock: Balance = - Balances::locks(&account).iter().map(|l| l.amount).max().unwrap_or_default(); + Balances::locks(account).iter().map(|l| l.amount).max().unwrap_or_default(); assert_eq!(max_lock, info.data.frozen, "Max lock should be equal to frozen balance"); - let sum_holds: Balance = Holds::::get(&account).iter().map(|l| l.amount).sum(); + let sum_holds: Balance = Holds::::get(account).iter().map(|l| l.amount).sum(); assert!( sum_holds <= info.data.reserved, "Sum of all holds ({sum_holds}) should be less than or equal to reserved balance {}",