Skip to content

Commit a41b84d

Browse files
author
Felix Müller
committed
minor comment update according to pr suggestions
1 parent 4870dff commit a41b84d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sidechain/consensus/common/src/peer_block_sync.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ where
112112
Error::BlockAncestryMismatch(_block_number, block_hash, _) => {
113113
warn!("Got ancestry mismatch error upon block import. Attempting to fetch missing blocks from peer");
114114

115-
// TODO need a 'finally' (or on-drop) here for the production suspension,
116-
// to ensure we resume block production, even when we return early?
117-
118115
// Suspend block production while we sync blocks from peer.
119116
self.block_production_suspender.suspend()?;
120117

118+
// TODO need a 'finally' (or on-drop) here for the production suspension,
119+
// to ensure we resume block production when we return early between `suspend` and `resume`
120+
// (e.g. with a `?` operator in between).
121+
121122
if let Err(e) = self.fetch_and_import_blocks_from_peer(
122123
block_hash,
123124
last_imported_parentchain_header,

0 commit comments

Comments
 (0)