Skip to content

Commit f2e1b4d

Browse files
committed
fix(heartbeats): Don't store scores that equal to 0
1 parent ad95bbf commit f2e1b4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/heartbeats-processor/src/local_db.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ pub async fn update_scores(pool: &SqlitePool, config: &Config) -> Result<()> {
529529
FROM public_keys pk
530530
LEFT JOIN HeartbeatCounts hc ON hc.public_key_id = pk.id
531531
LEFT JOIN BlockCounts bc ON bc.public_key_id = pk.id
532+
WHERE hc.heartbeats > 0 OR bc.blocks > 0
532533
ON CONFLICT(public_key_id) DO UPDATE SET
533534
score = excluded.score,
534535
blocks_produced = excluded.blocks_produced,

0 commit comments

Comments
 (0)