From: Arik Sosman Date: Thu, 17 Aug 2023 03:55:51 +0000 (-0700) Subject: Fix ordering of intermediate commits to ensure the latest comes first and is used... X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=rapid-gossip-sync-server;a=commitdiff_plain;h=8126ad4813aad9822f611635ec46692658569775 Fix ordering of intermediate commits to ensure the latest comes first and is used as the authoritative source of what's latest. --- diff --git a/src/lookup.rs b/src/lookup.rs index 9059124..eb0c8ee 100644 --- a/src/lookup.rs +++ b/src/lookup.rs @@ -288,6 +288,7 @@ pub(super) async fn fetch_channel_updates(delta_set: &mut DeltaSet, cl SELECT id, direction, blob_signed, CAST(EXTRACT('epoch' from seen) AS BIGINT) AS seen FROM channel_updates WHERE seen >= TO_TIMESTAMP($1) + ORDER BY timestamp DESC ", [last_sync_timestamp_float]).await.unwrap(); let mut pinned_updates = Box::pin(intermediate_updates); log_info!(logger, "Fetched intermediate rows in {:?}", start.elapsed());