fix for the reward history range
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
87eca056a3
commit
44bd27e8f0
@ -283,9 +283,18 @@ pub async fn get_validator_staking_results(
|
||||
) -> Result<()> {
|
||||
let (start, end) = super::raw_calls::historical::stored_range(api, None)
|
||||
.await?
|
||||
.map(|range| (range.0.saturating_div(6), range.1.saturating_div(6)))
|
||||
.map(|range| {
|
||||
(
|
||||
range.0
|
||||
.saturating_div(6)
|
||||
.saturating_sub(1),
|
||||
range.1
|
||||
.saturating_div(6)
|
||||
.saturating_sub(1),
|
||||
)
|
||||
})
|
||||
.unwrap_or((0, 0));
|
||||
for era_index in start..end.saturating_sub(2) {
|
||||
for era_index in start..end {
|
||||
get_validator_staking_result(action_tx, api, account_id, era_index).await?;
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user