Skip to content

Commit

Permalink
HostMsg renames fro ChannelMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-szabo committed Nov 24, 2024
1 parent b1c1dd7 commit 41a0a71
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
17 changes: 11 additions & 6 deletions code/crates/app-channel/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ where
_state: &mut Self::State,
) -> Result<(), ActorProcessingErr> {
match message {
HostMsg::StartRound {
HostMsg::StartedRound {
height,
round,
proposer,
} => {
self.sender
.send(ChannelMsg::StartRound {
.send(ChannelMsg::StartedRound {
height,
round,
proposer,
Expand Down Expand Up @@ -135,16 +135,18 @@ where
.send(ChannelMsg::GetValidatorSet { height, reply_to })
.await?;
}
HostMsg::Decide { certificate, .. } => {
self.sender.send(ChannelMsg::Decide { certificate }).await?
HostMsg::Decided { certificate, .. } => {
self.sender
.send(ChannelMsg::Decided { certificate })
.await?
}
HostMsg::GetDecidedBlock { height, reply_to } => {
let reply_to = create_reply_channel(reply_to).await?;
self.sender
.send(ChannelMsg::GetDecidedBlock { height, reply_to })
.await?;
}
HostMsg::ProcessSyncedBlockBytes {
HostMsg::ProcessSyncedBlock {
height,
round,
validator_address,
Expand All @@ -153,7 +155,7 @@ where
} => {
let reply_to = create_reply_channel(reply_to).await?;
self.sender
.send(ChannelMsg::ProcessSyncedBlockBytes {
.send(ChannelMsg::ProcessSyncedBlock {
height,
round,
validator_address,
Expand All @@ -162,6 +164,9 @@ where
})
.await?;
}
HostMsg::ConsensusReady(_) => {
self.sender.send(ChannelMsg::ConsensusReady {}).await?;
}
};
Ok(())
}
Expand Down
9 changes: 6 additions & 3 deletions code/crates/app-channel/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use tokio::sync::oneshot::Sender;
/// Messages that will be sent on the channel.
pub enum ChannelMsg<Ctx: Context> {
/// Consensus has started a new round.
StartRound {
StartedRound {
height: Ctx::Height,
round: Round,
proposer: Ctx::Address,
Expand Down Expand Up @@ -54,7 +54,7 @@ pub enum ChannelMsg<Ctx: Context> {
},

// Consensus has decided on a value
Decide {
Decided {
certificate: CommitCertificate<Ctx>,
},

Expand All @@ -65,11 +65,14 @@ pub enum ChannelMsg<Ctx: Context> {
},

// Synced block
ProcessSyncedBlockBytes {
ProcessSyncedBlock {
height: Ctx::Height,
round: Round,
validator_address: Ctx::Address,
block_bytes: Bytes,
reply_to: Sender<ProposedValue<Ctx>>,
},

/// Consensus is ready
ConsensusReady {},
}

0 comments on commit 41a0a71

Please sign in to comment.