This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 267
holochain_net: protocol update - HandleGetDht Data & Meta + renames #875
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated its comments.
Renamed some Protocol messages. Changed mock accordingly. Renamed node_a and node_b to alex and billy in test.
ddd-mtl
changed the title
WIP - Net protocol convention update
holochain_net: protocol update - HandleGetDht Data & Meta + renames
Jan 16, 2019
plus fixed test
# Resolved Conflicts: # core/src/network/reducers/get_entry.rs # core/src/network/reducers/get_links.rs
zippy
approved these changes
Jan 17, 2019
@@ -86,7 +86,7 @@ pub fn reduce( | |||
/// that lives in the NetworkState. | |||
pub fn send( | |||
network_state: &mut NetworkState, | |||
protocol_wrapper: ProtocolWrapper, | |||
json_message: JsonProtocol, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes more sense, easier to read
@@ -64,7 +64,7 @@ pub struct MessageData { | |||
} | |||
|
|||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, DefaultJson)] | |||
pub struct TrackAppData { | |||
pub struct TrackDnaData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you! Getting consistent on DNA instead of App is a good thing.
@@ -165,120 +165,134 @@ pub struct DhtMetaData { | |||
pub content: serde_json::Value, | |||
} | |||
|
|||
/// Enum holding all Message types in the 'hc-core <-> P2P Network Module' protocol. | |||
/// Enum holding all message types that serialize as json in the 'hc-core <-> P2P network module' protocol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, logical naming!
neonphog
approved these changes
Jan 17, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much Approve 🐶
lucksus
approved these changes
Jan 17, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(note: must sync with n3h PR: holochain/n3h#27)
Added HandleGetDhtData and HandleGetDhtMeta to follow SendMessage pattern.
Renamed ProtocolWrapper to JsonProtocol.
Renamed some of its enum variants like TrackApp -> TrackDna
Proposed naming convention:
Misc
Clearer comments and names in test_bin