Skip to content

Commit

Permalink
feat: update challenge frequent (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqaljn committed Sep 3, 2024
1 parent 0a1d6e0 commit eaedb4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pallets/audit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 <ChallengeSnapShot<T>>::contains_key(miner) {
log::info!("audit: Select invalid miner");
Expand Down
2 changes: 1 addition & 1 deletion standalone/chain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit eaedb4c

Please sign in to comment.