Remove historical state access from Serai

Resolves https://github.com/serai-dex/serai/issues/694.
This commit is contained in:
Luke Parker
2025-11-18 20:50:32 -05:00
parent 6100c3ca90
commit 6b19780c7b
22 changed files with 531 additions and 622 deletions

View File

@@ -36,8 +36,7 @@ impl<D: Db> PublishSlashReportTask<D> {
// This uses the latest finalized block, not the latest cosigned block, which should be
// fine as in the worst case, the only impact is no longer attempting TX publication
let serai = self.serai.as_of_latest_finalized_block().await.map_err(|e| format!("{e:?}"))?;
let serai = serai.validator_sets();
let serai = self.serai.state().await.map_err(|e| format!("{e:?}"))?;
let session_after_slash_report = Session(session.0 + 1);
let current_session =
serai.current_session(network.into()).await.map_err(|e| format!("{e:?}"))?;