Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions relays/messages/src/message_race_delivery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,16 @@ where
) -> Option<SourceHeaderIdOf<P>> {
let header_required_for_messages_delivery =
self.strategy.required_source_header_at_target(current_best);
let header_required_for_reward_confirmations_delivery =
self.latest_confirmed_nonces_at_source.back().map(|(id, _)| id.clone());
match (
header_required_for_messages_delivery,
header_required_for_reward_confirmations_delivery,
) {
(Some(id1), Some(id2)) => Some(if id1.0 > id2.0 { id1 } else { id2 }),
(a, b) => a.or(b),
}
header_required_for_messages_delivery
// let header_required_for_reward_confirmations_delivery =
// self.latest_confirmed_nonces_at_source.back().map(|(id, _)| id.clone());
// match (
// header_required_for_messages_delivery,
// header_required_for_reward_confirmations_delivery,
// ) {
// (Some(id1), Some(id2)) => Some(if id1.0 > id2.0 { id1 } else { id2 }),
// (a, b) => a.or(b),
// }
}

fn best_at_source(&self) -> Option<MessageNonce> {
Expand Down