mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
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:
@@ -3031,6 +3031,21 @@ mod offchain_phragmen {
|
||||
|
||||
let queued_result = Staking::queued_elected().unwrap();
|
||||
assert_eq!(queued_result.compute, ElectionCompute::Signed);
|
||||
assert_eq!(
|
||||
System::events()
|
||||
.into_iter()
|
||||
.map(|r| r.event)
|
||||
.filter_map(|e| {
|
||||
if let MetaEvent::staking(inner) = e {
|
||||
Some(inner)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.last()
|
||||
.unwrap(),
|
||||
RawEvent::SolutionStored(ElectionCompute::Signed),
|
||||
);
|
||||
|
||||
run_to_block(15);
|
||||
assert_eq!(Staking::era_election_status(), ElectionStatus::Closed);
|
||||
|
||||
Reference in New Issue
Block a user