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
1 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ mod accounts {
#[cfg(feature = "accounts")]
mod accounts {
use super::*;
use crate::upgrade::upgrade_key_location;
use crate::{ethereum_types::H256, upgrade::upgrade_key_location};
use std::str::FromStr;
pub use crate::accounts::AccountProvider;
@ -198,7 +198,8 @@ mod accounts {
engine_signer,
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)));
}
}