Skip to content

Commit

Permalink
Fix tests build
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone committed Dec 12, 2023
1 parent 2d4ed1f commit 196d9ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pallets/dkg-metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ sp-core = { workspace = true }
sp-io = { workspace = true }
sp-staking = { workspace = true }
sp-keystore = { workspace = true }
sp-state-machine = { workspace = true }
k256 = { version = "0.11.5", default-features = false, features = ["arithmetic", "ecdsa"] }

[features]
Expand Down
3 changes: 2 additions & 1 deletion pallets/dkg-metadata/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// construct_runtime requires this
#![allow(clippy::from_over_into, clippy::unwrap_used)]
use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{construct_runtime, parameter_types, BasicExternalities};
use frame_support::{construct_runtime, parameter_types};
use frame_system::EnsureRoot;
use sp_core::{
sr25519::{self, Signature},
Expand All @@ -33,6 +33,7 @@ use sp_runtime::{
},
BuildStorage, Percent, Permill,
};
use sp_state_machine::BasicExternalities;
use std::{sync::Arc, vec};

use crate as pallet_dkg_metadata;
Expand Down
6 changes: 1 addition & 5 deletions pallets/dkg-proposal-handler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,15 +462,11 @@ pub mod pallet {
let data = prop_batch.data();

// check the signature is valid
let _result = ensure_signed_by_dkg::<pallet_dkg_metadata::Pallet<T>>(
let result = ensure_signed_by_dkg::<pallet_dkg_metadata::Pallet<T>>(
&prop_batch.signature,
&data,
);

// Accept all signatures to make testing easier
#[cfg(test)]
let result: Result<(), dkg_runtime_primitives::utils::SignatureError> = Ok(());

match result {
Ok(_) => {
// Do nothing, it is all good.
Expand Down

0 comments on commit 196d9ec

Please sign in to comment.