fix miner_author by adding dummy msg

This commit is contained in:
rakita 2021-03-24 15:15:10 +01:00
parent 5eacff59e8
commit 561ed8df3c

View File

@ -71,7 +71,7 @@ mod accounts {
#[cfg(feature = "accounts")] #[cfg(feature = "accounts")]
mod accounts { mod accounts {
use super::*; use super::*;
use crate::upgrade::upgrade_key_location; use crate::{ethereum_types::H256, upgrade::upgrade_key_location};
use std::str::FromStr; use std::str::FromStr;
pub use crate::accounts::AccountProvider; pub use crate::accounts::AccountProvider;
@ -198,7 +198,8 @@ mod accounts {
engine_signer, engine_signer,
password.clone(), password.clone(),
); );
if signer.sign(Default::default()).is_ok() { // sign dummy msg to check if password and account can be used.
if signer.sign(H256::from_low_u64_be(1)).is_ok() {
author = Some(::ethcore::miner::Author::Sealer(Box::new(signer))); author = Some(::ethcore::miner::Author::Sealer(Box::new(signer)));
} }
} }