mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 00:01:03 +00:00
Integration tests (#805)
* Started substrate tests * Sync test * Test updates * Improved tests * Use on-chain block delay * Parallel test execution * Otimized tests * Logging * Fixed racing test * Fixed compilation * Fixed timestamp test * Removed rlp dependency * Minor fixes * Fixed tests * Removed best_block_id and resolved fdlimit issue * Whitespace * Use keyring * Style * Added API execution setting * Removed stale import
This commit is contained in:
committed by
Gav Wood
parent
955a5393d8
commit
9a660f82ed
@@ -431,6 +431,9 @@ impl<T: Trait> Module<T> {
|
||||
/// Get the reward for the session, assuming it ends with this block.
|
||||
fn this_session_reward(actual_elapsed: T::Moment) -> T::Balance {
|
||||
let ideal_elapsed = <session::Module<T>>::ideal_session_duration();
|
||||
if ideal_elapsed.is_zero() {
|
||||
return Self::current_session_reward();
|
||||
}
|
||||
let per65536: u64 = (T::Moment::sa(65536u64) * ideal_elapsed.clone() / actual_elapsed.max(ideal_elapsed)).as_();
|
||||
Self::current_session_reward() * T::Balance::sa(per65536) / T::Balance::sa(65536u64)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user