File tree 1 file changed +12
-1
lines changed
domains/client/domain-operator/src
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -231,8 +231,19 @@ where
231
231
let header = self . client . header ( domain_tip) ?. ok_or_else ( || {
232
232
sp_blockchain:: Error :: Backend ( format ! ( "Header for #{:?} not found" , domain_tip) )
233
233
} ) ?;
234
+ let block_origin = if self
235
+ . domain_block_processor
236
+ . consensus_network_sync_oracle
237
+ . is_major_syncing ( )
238
+ {
239
+ // The domain block is derived from the consensus block, if the consensus chain is
240
+ // in major sync then we should also consider the domain block is `NetworkInitialSync`
241
+ BlockOrigin :: NetworkInitialSync
242
+ } else {
243
+ BlockOrigin :: Own
244
+ } ;
234
245
let block_import_params = {
235
- let mut import_block = BlockImportParams :: new ( BlockOrigin :: Own , header) ;
246
+ let mut import_block = BlockImportParams :: new ( block_origin , header) ;
236
247
import_block. import_existing = true ;
237
248
import_block. fork_choice = Some ( ForkChoiceStrategy :: Custom ( true ) ) ;
238
249
import_block. state_action = StateAction :: Skip ;
You can’t perform that action at this time.
0 commit comments