File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -191,17 +191,14 @@ impl DataSource for BundleQueue {
191
191
inner. set_time ( time) ;
192
192
193
193
if r. is_genesis ( ) || inner. mode . is_passive ( ) {
194
- // allow DKG in passive mode (first 8 rounds from genesis)
195
- let candidate_list = CandidateList :: builder ( Timestamp :: now ( ) , inner. index )
196
- . with_dkg ( inner. dkg . clone ( ) )
194
+ return CandidateList :: builder ( Timestamp :: now ( ) , inner. index )
195
+ . with_dkg ( inner. dkg . take ( ) )
197
196
. finish ( )
198
197
. try_into ( )
199
198
. unwrap_or_else ( |err| {
200
199
error ! ( %err, "candidate list serialization error" ) ;
201
200
CandidateListBytes :: default ( )
202
201
} ) ;
203
- inner. dkg = None ;
204
- return candidate_list;
205
202
}
206
203
207
204
let mut size_budget = inner. max_len ;
@@ -229,19 +226,16 @@ impl DataSource for BundleQueue {
229
226
regular. push ( b. clone ( ) )
230
227
}
231
228
232
- let candidate_list = CandidateList :: builder ( inner. time , inner. index )
229
+ CandidateList :: builder ( inner. time , inner. index )
233
230
. with_priority_bundles ( priority)
234
231
. with_regular_bundles ( regular)
235
- . with_dkg ( inner. dkg . clone ( ) )
232
+ . with_dkg ( inner. dkg . take ( ) )
236
233
. finish ( )
237
234
. try_into ( )
238
235
. unwrap_or_else ( |err| {
239
236
error ! ( %err, "candidate list serialization error" ) ;
240
237
CandidateListBytes :: default ( )
241
- } ) ;
242
-
243
- inner. dkg = None ;
244
- candidate_list
238
+ } )
245
239
}
246
240
}
247
241
You can’t perform that action at this time.
0 commit comments