Skip to content

Commit

Permalink
Receive bundles even if new_outbox_entries. (#2543)
Browse files Browse the repository at this point in the history
* Receive bundles even if new_outbox_entries.

* Use an if statement instead of ||.
  • Loading branch information
afck authored and ma2bd committed Sep 26, 2024
1 parent 085e7ad commit 3060ef6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions linera-core/src/chain_worker/state/attempted_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,14 @@ where
let add_to_received_log = previous_height != Some(bundle.height);
previous_height = Some(bundle.height);
// Update the staged chain state with the received block.
new_outbox_entries = new_outbox_entries
|| self
.state
.chain
.receive_message_bundle(&origin, bundle, local_time, add_to_received_log)
.await?;
if self
.state
.chain
.receive_message_bundle(&origin, bundle, local_time, add_to_received_log)
.await?
{
new_outbox_entries = true;
}
}
if !self.state.config.allow_inactive_chains && !self.state.chain.is_active() {
// Refuse to create a chain state if the chain is still inactive by
Expand Down

0 comments on commit 3060ef6

Please sign in to comment.