Skip to content

Commit 51e89b5

Browse files
authored
Merge pull request #77 from RSquad/simplex_upgrade
Support for latest changes in Simplex consensus
2 parents e289e19 + be3fc57 commit 51e89b5

45 files changed

Lines changed: 4342 additions & 4640 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/adnl/src/overlay/broadcast.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,19 @@ impl BroadcastProtocol<BroadcastTwostepFec> for BroadcastTwostepFecProtocol {
17581758
ctx: &mut BroadcastRecvContext,
17591759
bcast_id: &BroadcastId,
17601760
) -> Result<(Option<BroadcastRecvInfo>, bool)> {
1761-
<Self as FecProtocol<BroadcastTwostepFec>>::process_broadcast(bcast, ctx, bcast_id).await
1761+
let (info, mut resend) =
1762+
<Self as FecProtocol<BroadcastTwostepFec>>::process_broadcast(bcast, ctx, bcast_id)
1763+
.await?;
1764+
if resend {
1765+
let Some(bcast) = ctx.overlay.owned_broadcasts.get(bcast_id) else {
1766+
return Ok((info, false));
1767+
};
1768+
let Some(transfer) = Self::unwrap_transfer(bcast.val()) else {
1769+
return Ok((info, false));
1770+
};
1771+
resend = ctx.peers.other() == &transfer.src_key_id;
1772+
}
1773+
Ok((info, resend))
17621774
}
17631775

17641776
// Send side

0 commit comments

Comments
 (0)