Skip to content

Commit

Permalink
Merge pull request #706 from helium/andymck/wait-for-wifi-hbs
Browse files Browse the repository at this point in the history
add wifi HB check to rewards data current check
  • Loading branch information
andymck authored Jan 10, 2024
2 parents 0225ebf + 978facd commit 684e43f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mobile_verifier/src/rewarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,19 @@ where
.await?
== 0
{
tracing::info!("No heartbeats found past reward period");
tracing::info!("No cbrs heartbeats found past reward period");
return Ok(false);
}

if sqlx::query_scalar::<_, i64>(
"SELECT COUNT(*) FROM wifi_heartbeats WHERE latest_timestamp >= $1",
)
.bind(reward_period.end)
.fetch_one(&self.pool)
.await?
== 0
{
tracing::info!("No wifi heartbeats found past reward period");
return Ok(false);
}

Expand Down

0 comments on commit 684e43f

Please sign in to comment.