@@ -314,7 +314,7 @@ impl Deadline {
314314 return Ok ( ( ) ) ;
315315 }
316316
317- let mut queue = BitFieldQueue :: new ( store, & self . expirations_epochs , quant)
317+ let mut queue = BitFieldQueue :: load ( store, & self . expirations_epochs , quant)
318318 . map_err ( |e| e. downcast_wrap ( "failed to load expiration queue" ) ) ?;
319319 queue
320320 . add_to_queue_values ( expiration_epoch, partitions. iter ( ) . copied ( ) )
@@ -475,9 +475,8 @@ impl Deadline {
475475 self . partitions = partitions. flush ( ) ?;
476476
477477 // Next, update the expiration queue.
478- let mut deadline_expirations =
479- BitFieldQueue :: new ( store, & self . expirations_epochs , quant)
480- . map_err ( |e| e. downcast_wrap ( "failed to load expiration epochs" ) ) ?;
478+ let mut deadline_expirations = BitFieldQueue :: load ( store, & self . expirations_epochs , quant)
479+ . map_err ( |e| e. downcast_wrap ( "failed to load expiration epochs" ) ) ?;
481480 deadline_expirations
482481 . add_many_to_queue_values ( partition_deadline_updates. iter ( ) . copied ( ) )
483482 . map_err ( |e| e. downcast_wrap ( "failed to add expirations for new deadlines" ) ) ?;
@@ -552,7 +551,7 @@ impl Deadline {
552551 until : ChainEpoch ,
553552 quant : QuantSpec ,
554553 ) -> anyhow:: Result < ( BitField , bool ) > {
555- let mut expirations = BitFieldQueue :: new ( store, & self . expirations_epochs , quant) ?;
554+ let mut expirations = BitFieldQueue :: load ( store, & self . expirations_epochs , quant) ?;
556555 let ( popped, modified) = expirations
557556 . pop_until ( until)
558557 . map_err ( |e| e. downcast_wrap ( "failed to pop expiring partitions" ) ) ?;
@@ -741,7 +740,7 @@ impl Deadline {
741740 self . total_sectors -= removed_live_sectors + removed_dead_sectors;
742741
743742 // Update expiration bitfields.
744- let mut expiration_epochs = BitFieldQueue :: new ( store, & self . expirations_epochs , quant)
743+ let mut expiration_epochs = BitFieldQueue :: load ( store, & self . expirations_epochs , quant)
745744 . map_err ( |e| e. downcast_wrap ( "failed to load expiration queue" ) ) ?;
746745
747746 expiration_epochs. cut ( to_remove) . map_err ( |e| {
0 commit comments