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

Add Swarm<T>.LastMessageTimestamp #964

Merged
merged 3 commits into from Aug 26, 2020

Conversation

longfin
Copy link
Member

@longfin longfin commented Aug 24, 2020

This PR adds LastMessageTimestamp to Swarm<T> so that library users can take appropriate action. (e.g. restarting Swarm<T>)

Also, I didn't mention deleted Swarm<T>.LastReceived because it hadn't been in the previous documentation.

@longfin longfin added the network Related to networking (Libplanet.Net) label Aug 24, 2020
@longfin longfin self-assigned this Aug 24, 2020
@longfin longfin marked this pull request as ready for review August 24, 2020 14:51
@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #964 into main will decrease coverage by 74.73%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main     #964       +/-   ##
===========================================
- Coverage   88.55%   13.81%   -74.74%     
===========================================
  Files         315      291       -24     
  Lines       27652    26997      -655     
===========================================
- Hits        24486     3729    -20757     
- Misses       1620    23092    +21472     
+ Partials     1546      176     -1370     
Impacted Files Coverage Δ
Libplanet.Tests/Net/Protocols/TestTransport.cs 0.00% <0.00%> (-77.24%) ⬇️
Libplanet.Tests/Net/SwarmTest.cs 0.00% <0.00%> (-95.39%) ⬇️
Libplanet/Net/NetMQTransport.cs 0.00% <0.00%> (-81.63%) ⬇️
Libplanet/Net/Swarm.cs 0.00% <0.00%> (-85.52%) ⬇️
Libplanet/Net/PeerState.cs 0.00% <0.00%> (-100.00%) ⬇️
Libplanet.Stun/Stun/Crc32.cs 0.00% <0.00%> (-100.00%) ⬇️
Libplanet/Blocks/RawBlock.cs 0.00% <0.00%> (-100.00%) ⬇️
Libplanet/FixedSizedQueue.cs 0.00% <0.00%> (-100.00%) ⬇️
Libplanet/Net/Messages/Tx.cs 0.00% <0.00%> (-100.00%) ⬇️
Libplanet/Net/SwarmOptions.cs 0.00% <0.00%> (-100.00%) ⬇️
... and 278 more

earlbread
earlbread previously approved these changes Aug 25, 2020
Libplanet/Net/Swarm.cs Outdated Show resolved Hide resolved
moreal
moreal previously approved these changes Aug 25, 2020
moreal
moreal previously approved these changes Aug 25, 2020
earlbread
earlbread previously approved these changes Aug 25, 2020
limebell
limebell previously approved these changes Aug 25, 2020
riemannulus
riemannulus previously approved these changes Aug 25, 2020
limebell
limebell previously approved these changes Aug 25, 2020
moreal
moreal previously approved these changes Aug 25, 2020
Libplanet/Net/Swarm.cs Outdated Show resolved Hide resolved
@longfin longfin dismissed stale reviews from moreal and limebell via f485112 August 25, 2020 07:18
@limebell
Copy link
Member

Build seems to fail. 😥

@longfin
Copy link
Member Author

longfin commented Aug 25, 2020

Build seems to fail. 😥

@limebell Thanks for reporting, resolved at fd67334.

dahlia
dahlia previously approved these changes Aug 25, 2020
longfin and others added 2 commits August 25, 2020 17:10
Co-authored-by: Hong Minhee (洪 民憙) <hong.minhee@gmail.com>
@longfin
Copy link
Member Author

longfin commented Aug 25, 2020

I've found a mistake (ITransport.LastMessageTimestamp also should be DateTimeOffset?). so I fixed it and add assertion. PTAL @libplanet

@longfin longfin merged commit 8e8af7f into planetarium:main Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network Related to networking (Libplanet.Net)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants