@@ -992,7 +992,7 @@ async fn sequence_entries<L: LogEntry>(
992992 // This is a critical error, since we don't know the state of the
993993 // checkpoint in the database at this point. Bail and let [SequenceState::load] get us
994994 // to a good state after restart.
995- swap_checkpoint ( lock, sequence_state. checkpoint ( ) , & new_checkpoint)
995+ lock. swap ( CHECKPOINT_KEY , sequence_state. checkpoint ( ) , & new_checkpoint)
996996 . await
997997 . map_err ( |e| {
998998 SequenceError :: Fatal ( format ! ( "couldn't upload checkpoint to database: {e}" ) )
@@ -1356,20 +1356,6 @@ fn marshal_staged_uploads(
13561356 . collect :: < Vec < _ > > ( ) )
13571357}
13581358
1359- /// Does a compare-and-swap of checkpoints. Useful for updating a checkpoint
1360- /// to include new cosignatures
1361- ///
1362- /// # Errors
1363- /// Errors when `old` doesn't match the current checkpoint, or if fetching or
1364- /// setting storage failed.
1365- pub ( crate ) async fn swap_checkpoint (
1366- lock : & impl LockBackend ,
1367- old : & [ u8 ] ,
1368- new : & [ u8 ] ,
1369- ) -> Result < ( ) , WorkerError > {
1370- lock. swap ( CHECKPOINT_KEY , old, new) . await
1371- }
1372-
13731359/// [`UploadOptions`] are used as part of the [`ObjectBackend::upload`] method, and are
13741360/// marshaled to JSON and stored in the staging bundles.
13751361#[ derive( Debug , Default , Serialize , Clone , Deserialize ) ]
0 commit comments