Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rusk: add protocol version to Message #2251

Merged
merged 10 commits into from
Sep 5, 2024
2 changes: 1 addition & 1 deletion consensus/src/proposal/block_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<T: Operations> Generator<T> {

candidate.sign(&ru.secret_key, ru.pubkey_bls.inner());

Ok(Message::new_candidate(candidate))
Ok(candidate.into())
}

async fn generate_block(
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/ratification/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl RatificationHandler {
},
};

Message::new_quorum(quorum)
quorum.into()
}

pub(crate) fn reset(&mut self, iter: u8, validation: ValidationResult) {
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/ratification/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl RatificationStep {
let ratification =
self::build_ratification_payload(ru, iteration, result);

let msg = Message::new_ratification(ratification);
let msg = Message::from(ratification);

// Publish ratification vote
info!(event = "send_vote", validation_bitset = result.sv().bitset);
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/step_votes_reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl AttInfoRegistry {

let payload = payload::Quorum { header, att };

Message::new_quorum(payload)
payload.into()
}

pub(crate) fn get_failed_atts(&self, to: u8) -> Vec<Option<IterationInfo>> {
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/validation/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn final_result(
quorum: QuorumType,
) -> HandleMsgOutput {
let p = payload::ValidationResult::new(sv, vote, quorum);
let msg = Message::from_validation_result(p);
let msg = Message::from(p);

HandleMsgOutput::Ready(msg)
}
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/validation/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<T: Operations + 'static> ValidationStep<T> {
// Sign and construct validation message
let validation = self::build_validation_payload(vote, ru, iteration);
info!(event = "send_vote", vote = ?validation.vote);
let msg = Message::new_validation(validation);
let msg = Message::from(validation);

// Publish
outbound.try_send(msg.clone());
Expand Down
Loading
Loading