companion for 11350 (#5489)

* fix all runtimes

* fix staking miner

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-05-11 20:22:15 +01:00
committed by GitHub
parent bca124a46f
commit eb2448e1be
6 changed files with 253 additions and 190 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ fn force_create_snapshot<T: EPM::Config>(ext: &mut Ext) -> Result<(), Error<T>>
async fn print_info<T: EPM::Config>(
rpc: &SharedRpcClient,
ext: &mut Ext,
raw_solution: &EPM::RawSolution<EPM::SolutionOf<T>>,
raw_solution: &EPM::RawSolution<EPM::SolutionOf<T::MinerConfig>>,
extrinsic: &Bytes,
) where
<T as EPM::Config>::Currency: Currency<T::AccountId, Balance = Balance>,
+6 -6
View File
@@ -238,7 +238,7 @@ enum Error<T: EPM::Config> {
Codec(#[from] codec::Error),
Crypto(sp_core::crypto::SecretStringError),
RemoteExternalities(&'static str),
PalletMiner(EPM::unsigned::MinerError<T>),
PalletMiner(EPM::unsigned::MinerError),
PalletElection(EPM::ElectionError<T>),
PalletFeasibility(EPM::FeasibilityError),
AccountDoesNotExists,
@@ -254,8 +254,8 @@ impl<T: EPM::Config> From<sp_core::crypto::SecretStringError> for Error<T> {
}
}
impl<T: EPM::Config> From<EPM::unsigned::MinerError<T>> for Error<T> {
fn from(e: EPM::unsigned::MinerError<T>) -> Error<T> {
impl<T: EPM::Config> From<EPM::unsigned::MinerError> for Error<T> {
fn from(e: EPM::unsigned::MinerError) -> Error<T> {
Error::PalletMiner(e)
}
}
@@ -463,7 +463,7 @@ async fn create_election_ext<T: EPM::Config, B: BlockT + DeserializeOwned>(
fn mine_solution<T, S>(
ext: &mut Ext,
do_feasibility: bool,
) -> Result<EPM::RawSolution<EPM::SolutionOf<T>>, Error<T>>
) -> Result<EPM::RawSolution<EPM::SolutionOf<T::MinerConfig>>, Error<T>>
where
T: EPM::Config,
S: NposSolver<
@@ -473,7 +473,7 @@ where
{
ext.execute_with(|| {
let (solution, _) =
<EPM::Pallet<T>>::mine_solution::<S>().map_err::<Error<T>, _>(Into::into)?;
<EPM::Pallet<T>>::mine_solution().map_err::<Error<T>, _>(Into::into)?;
if do_feasibility {
let _ = <EPM::Pallet<T>>::feasibility_check(
solution.clone(),
@@ -489,7 +489,7 @@ fn mine_with<T>(
solver: &Solver,
ext: &mut Ext,
do_feasibility: bool,
) -> Result<EPM::RawSolution<EPM::SolutionOf<T>>, Error<T>>
) -> Result<EPM::RawSolution<EPM::SolutionOf<T::MinerConfig>>, Error<T>>
where
T: EPM::Config,
T::Solver: NposSolver<Error = sp_npos_elections::Error>,