From eaedb4c65dac561784d7f3fac546531f342b878a Mon Sep 17 00:00:00 2001 From: Elden Young <59600396+ytqaljn@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:00:12 +0800 Subject: [PATCH] feat: update challenge frequent (#394) --- pallets/audit/src/lib.rs | 3 ++- standalone/chain/runtime/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/audit/src/lib.rs b/pallets/audit/src/lib.rs index f53d5dd7..de59b508 100644 --- a/pallets/audit/src/lib.rs +++ b/pallets/audit/src/lib.rs @@ -1019,7 +1019,7 @@ pub mod pallet { return weight; } - if now % 10u32.saturated_into() != 0u32.saturated_into() { + if now % 4u32.saturated_into() != 0u32.saturated_into() { return weight; } @@ -1040,6 +1040,7 @@ pub mod pallet { }; let index = factor % miner_count; let miner = &miner_list[index as usize]; + log::info!("generate challenge index: {:?}", index); if >::contains_key(miner) { log::info!("audit: Select invalid miner"); diff --git a/standalone/chain/runtime/src/lib.rs b/standalone/chain/runtime/src/lib.rs index 93342ed7..02f4ea69 100644 --- a/standalone/chain/runtime/src/lib.rs +++ b/standalone/chain/runtime/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 117, + spec_version: 118, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1,