@@ -314,7 +314,7 @@ impl Deadline {
314
314
return Ok ( ( ) ) ;
315
315
}
316
316
317
- let mut queue = BitFieldQueue :: new ( store, & self . expirations_epochs , quant)
317
+ let mut queue = BitFieldQueue :: load ( store, & self . expirations_epochs , quant)
318
318
. map_err ( |e| e. downcast_wrap ( "failed to load expiration queue" ) ) ?;
319
319
queue
320
320
. add_to_queue_values ( expiration_epoch, partitions. iter ( ) . copied ( ) )
@@ -475,9 +475,8 @@ impl Deadline {
475
475
self . partitions = partitions. flush ( ) ?;
476
476
477
477
// 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" ) ) ?;
481
480
deadline_expirations
482
481
. add_many_to_queue_values ( partition_deadline_updates. iter ( ) . copied ( ) )
483
482
. map_err ( |e| e. downcast_wrap ( "failed to add expirations for new deadlines" ) ) ?;
@@ -552,7 +551,7 @@ impl Deadline {
552
551
until : ChainEpoch ,
553
552
quant : QuantSpec ,
554
553
) -> 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) ?;
556
555
let ( popped, modified) = expirations
557
556
. pop_until ( until)
558
557
. map_err ( |e| e. downcast_wrap ( "failed to pop expiring partitions" ) ) ?;
@@ -741,7 +740,7 @@ impl Deadline {
741
740
self . total_sectors -= removed_live_sectors + removed_dead_sectors;
742
741
743
742
// 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)
745
744
. map_err ( |e| e. downcast_wrap ( "failed to load expiration queue" ) ) ?;
746
745
747
746
expiration_epochs. cut ( to_remove) . map_err ( |e| {
0 commit comments