Tidy Serai use in coordinator to new API

This commit is contained in:
Luke Parker
2023-10-14 02:59:22 -04:00
parent 530fba51dd
commit e3e9939eaf
2 changed files with 7 additions and 7 deletions

View File

@@ -216,8 +216,8 @@ pub(crate) async fn scan_tributaries_task<
// creation
// TODO2: Differentiate connection errors from invariants
Err(e) => {
if let Ok(latest) = serai.latest_block_hash().await {
let serai = serai.as_of(latest).validator_sets();
if let Ok(serai) = serai.with_current_latest_block().await {
let serai = serai.validator_sets();
// Check if this failed because the keys were already set by someone
// else
if matches!(serai.keys(spec.set()).await, Ok(Some(_))) {