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

Change Peer Uri to IPEndPoint #123

Merged
merged 6 commits into from Mar 9, 2019

Conversation

Projects
None yet
3 participants
@ipdae
Copy link
Member

commented Mar 9, 2019

resolve #120

@codecov

This comment has been minimized.

Copy link

commented Mar 9, 2019

Codecov Report

Merging #123 into master will increase coverage by 0.03%.
The diff coverage is 96.55%.

@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   88.04%   88.07%   +0.03%     
==========================================
  Files          61       61              
  Lines        2994     3003       +9     
==========================================
+ Hits         2636     2645       +9     
  Misses        358      358
Impacted Files Coverage Δ
Libplanet/Net/Peer.cs 95% <100%> (+1.25%) ⬆️
Libplanet/Net/Swarm.cs 89.95% <90%> (+0.01%) ⬆️

@ipdae ipdae force-pushed the ipdae:issues-120 branch from ef2a0ac to f2d7817 Mar 9, 2019

@dahlia
Copy link
Member

left a comment

@longfin Could you review this?

CHANGES.md Outdated
@@ -6,6 +6,8 @@ Version 0.2.0

To be released.

- Change type of Peer.`Urls` to `IPEndPoint`.

This comment has been minimized.

Copy link
@dahlia

dahlia Mar 9, 2019

Member

Please write the sentence in past tense and I think Peer.Urls should be quoted altogether.

The type of Peer.Urls property is changed from Uri to IPEndPoint.


public void GetObjectData(
SerializationInfo info,
StreamingContext context
)
{
info.AddValue("public_key", PublicKey.Format(true));
info.AddValue("urls", Urls.Select(u => u.ToString()).ToList());
info.AddValue(

This comment has been minimized.

Copy link
@longfin

longfin Mar 9, 2019

Member

I think we can accomplish it just like this. (please let me know if it doesn't works.)

info.AddValue("end_points", EndPoints.ToList());

This comment has been minimized.

Copy link
@ipdae

ipdae Mar 9, 2019

Author Member

it raise InvalidCastException when deserialize Peer. because IPEndPoint is not implement IConvirtible.

@dahlia

dahlia approved these changes Mar 9, 2019

@dahlia dahlia merged commit 6f7ef1b into planetarium:master Mar 9, 2019

4 checks passed

Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codecov/patch 96.55% of diff hit (target 88.04%)
Details
codecov/project 88.07% (+0.03%) compared to f43b337
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.