Skip to content

Commit 1631d8f

Browse files
committed
update BlockOrigin in chain_sync
1 parent 0cd6ce0 commit 1631d8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

substrate/client/network/sync/src/strategy/chain_sync.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,10 +1553,12 @@ where
15531553
);
15541554
}
15551555

1556-
let origin = if !gap && !self.status().state.is_major_syncing() {
1556+
let origin = if !self.status().state.is_major_syncing() {
15571557
BlockOrigin::NetworkBroadcast
1558+
} else if gap {
1559+
BlockOrigin::GapSync
15581560
} else {
1559-
BlockOrigin::NetworkInitialSync
1561+
BlockOrigin::StateSync { is_verified: false }
15601562
};
15611563

15621564
if let Some((h, n)) = new_blocks
@@ -2009,7 +2011,7 @@ where
20092011

20102012
match import_result {
20112013
ImportResult::Import(hash, header, state, body, justifications) => {
2012-
let origin = BlockOrigin::NetworkInitialSync;
2014+
let origin = BlockOrigin::StateSync { is_verified: !self.skip_execution() };
20132015
let block = IncomingBlock {
20142016
hash,
20152017
header: Some(header),

0 commit comments

Comments
 (0)