Events and better log for staking. (#6118)

* Events and better log for staking.

* Fix build

* Update frame/staking/src/lib.rs

Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>

Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>
This commit is contained in:
Kian Paimani
2020-05-25 17:11:47 +02:00
committed by GitHub
parent 60e7c706db
commit 609f7daa12
3 changed files with 32 additions and 11 deletions
@@ -29,7 +29,7 @@ use sp_phragmen::{
};
use sp_runtime::offchain::storage::StorageValueRef;
use sp_runtime::{PerThing, RuntimeDebug, traits::{TrailingZeroInput, Zero}};
use frame_support::{debug, traits::Get};
use frame_support::traits::Get;
use sp_std::{convert::TryInto, prelude::*};
/// Error types related to the offchain election machinery.
@@ -249,8 +249,8 @@ pub fn prepare_submission<T: Trait>(
nominators: snapshot_nominators.len() as NominatorIndex,
};
debug::native::debug!(
target: "staking",
crate::log!(
info,
"prepared solution after {} equalization iterations with score {:?}",
iterations_executed,
score,