Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Anti entropy #105

Merged
merged 19 commits into from May 10, 2021
Merged

Anti entropy #105

merged 19 commits into from May 10, 2021

Conversation

Yoga07
Copy link
Contributor

@Yoga07 Yoga07 commented Apr 29, 2021

No description provided.

src/client/mod.rs Outdated Show resolved Hide resolved

/// Type of message.
/// Note this is part of this crate's public API but this enum is
/// never serialised or even part of the message that is sent over the wire.
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Clone)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be careful deriving Clone on types that can be very large. IMO it's best if we avoid this as much as possible so we are naturally careful with .clone().

src/serialisation/mod.rs Outdated Show resolved Hide resolved
src/serialisation/mod.rs Outdated Show resolved Hide resolved
pub fn src_section_pk(&self) -> Option<PublicKey> {
self.src_section_pk
}

// Parses the provided bytes to deserialize a WireMsgHeader,
// returning the created WireMsgHeader, as well as the remaining bytes which
// correspond to the message payload. The caller shall then take care of
// deserializing the payload using the information provided in the WireMsgHeader.
pub fn from(mut bytes: Bytes) -> Result<(Self, Bytes)> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's best to keep this function definition consistent with the From trait and rename this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably go into it's own PR. Maybe there's a bunch of things like this that can be done all in one go.

@oetyng oetyng force-pushed the anti-entropy branch 5 times, most recently from 2113366 to 2c42284 Compare May 4, 2021 14:27
@oetyng oetyng force-pushed the anti-entropy branch 2 times, most recently from 8a8eb69 to 4eac2f1 Compare May 8, 2021 07:31
@oetyng oetyng marked this pull request as ready for review May 8, 2021 08:22
@oetyng oetyng requested a review from a team as a code owner May 8, 2021 08:22
- Outdated since section wallets are no longer used.
@oetyng oetyng merged commit f56d75f into master May 10, 2021
@oetyng oetyng deleted the anti-entropy branch May 10, 2021 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants