@@ -108,13 +108,12 @@ impl Deadlines {
108
108
store : & BS ,
109
109
orig_deadline : & mut Deadline ,
110
110
dest_deadline : & mut Deadline ,
111
- dest_quant : QuantSpec ,
112
111
partitions : & BitField ,
113
112
) -> anyhow:: Result < ( ) > {
114
113
let mut orig_partitions = orig_deadline. partitions_amt ( store) ?;
115
114
let mut dest_partitions = dest_deadline. partitions_amt ( store) ?;
116
115
117
- // even though we're moving partitions intact, we still need to update from/to `Deadline` accordingly.
116
+ // even though we're moving partitions intact, we still need to update orig/dest `Deadline` accordingly.
118
117
119
118
let first_dest_partition_idx = dest_partitions. count ( ) ;
120
119
for ( i, orig_partition_idx) in partitions. iter ( ) . enumerate ( ) {
@@ -128,13 +127,13 @@ impl Deadlines {
128
127
129
128
let dest_partition_idx = first_dest_partition_idx + i as u64 ;
130
129
131
- moving_partition. adjust_for_move ( store, & dest_quant ) ?;
130
+ moving_partition. adjust_for_move ( store) ?;
132
131
133
132
let all_sectors = moving_partition. sectors . len ( ) ;
134
133
let live_sectors = moving_partition. live_sectors ( ) . len ( ) ;
135
134
let early_terminations = orig_deadline. early_terminations . get ( orig_partition_idx) ;
136
135
137
- // start updating from/to `Deadline` here
136
+ // start updating orig/dest `Deadline` here
138
137
139
138
orig_deadline. total_sectors -= all_sectors;
140
139
orig_deadline. live_sectors -= live_sectors;
@@ -162,16 +161,16 @@ impl Deadlines {
162
161
let mut dest_expirations_epochs: Array < BitField , _ > =
163
162
Array :: load ( & dest_deadline. expirations_epochs , store) ?;
164
163
orig_expirations_epochs. for_each_mut ( |orig_epoch, orig_bitfield| {
165
- let dest_epoch = dest_quant . quantize_up ( orig_epoch as ChainEpoch ) ;
164
+ let dest_epoch = orig_epoch;
166
165
let mut to_bitfield =
167
- dest_expirations_epochs. get ( dest_epoch as u64 ) ?. cloned ( ) . unwrap_or_default ( ) ;
166
+ dest_expirations_epochs. get ( dest_epoch) ?. cloned ( ) . unwrap_or_default ( ) ;
168
167
for ( i, partition_id) in partitions. iter ( ) . enumerate ( ) {
169
168
if orig_bitfield. get ( partition_id) {
170
169
orig_bitfield. unset ( partition_id) ;
171
170
to_bitfield. set ( first_dest_partition_idx + i as u64 ) ;
172
171
}
173
172
}
174
- dest_expirations_epochs. set ( dest_epoch as u64 , to_bitfield) ?;
173
+ dest_expirations_epochs. set ( dest_epoch, to_bitfield) ?;
175
174
176
175
if orig_bitfield. is_empty ( ) {
177
176
epochs_to_remove. push ( orig_epoch) ;
0 commit comments