diff --git a/backfill/src/worker/program_transformer.rs b/backfill/src/worker/program_transformer.rs index 402e233b0..b6416948f 100644 --- a/backfill/src/worker/program_transformer.rs +++ b/backfill/src/worker/program_transformer.rs @@ -35,7 +35,7 @@ impl ProgramTransformerWorkerArgs { transactions.push(gap); } - transactions.sort_by(|(a, _), (b, _)| a.cmp(&b)); + transactions.sort_by(|(a, _), (b, _)| a.cmp(b)); for (_, transaction) in transactions { if let Err(e) = program_transformer.handle_transaction(&transaction).await { diff --git a/program_transformers/src/bubblegum/db.rs b/program_transformers/src/bubblegum/db.rs index 27c456dea..df7f12c15 100644 --- a/program_transformers/src/bubblegum/db.rs +++ b/program_transformers/src/bubblegum/db.rs @@ -77,7 +77,7 @@ where ..Default::default() }; - let mut query = cl_items::Entity::insert(item) + let query = cl_items::Entity::insert(item) .on_conflict( OnConflict::columns([cl_items::Column::Tree, cl_items::Column::NodeIdx]) .update_columns([ @@ -89,7 +89,6 @@ where .to_owned(), ) .build(DbBackend::Postgres); - query.sql = format!("{} WHERE excluded.seq >= cl_items.seq", query.sql); txn.execute(query) .await .map_err(|db_err| ProgramTransformerError::StorageWriteError(db_err.to_string()))?; @@ -118,7 +117,7 @@ where cl_audits_v2::Column::LeafIdx, cl_audits_v2::Column::Seq, ]) - .do_nothing() + .update_columns([cl_audits_v2::Column::Tx, cl_audits_v2::Column::Instruction]) .to_owned(), ) .build(DbBackend::Postgres);