From fe6e082396a34681f5f4c40cdbd2bb21b9770ed5 Mon Sep 17 00:00:00 2001 From: Ko Chanhyuck Date: Thu, 19 Dec 2019 13:32:39 +0900 Subject: [PATCH 1/2] Introduce Swarm.Peers --- Libplanet/Net/Swarm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libplanet/Net/Swarm.cs b/Libplanet/Net/Swarm.cs index 163c344e84..350e00f6a4 100644 --- a/Libplanet/Net/Swarm.cs +++ b/Libplanet/Net/Swarm.cs @@ -262,6 +262,8 @@ private set } } + public IEnumerable Peers => Protocol.Peers; + internal AsyncAutoResetEvent TxReceived { get; } internal AsyncAutoResetEvent BlockReceived { get; } @@ -271,8 +273,6 @@ private set internal TimeSpan BlockHashRecvTimeout { get; set; } = TimeSpan.FromSeconds(30); - internal IEnumerable Peers => Protocol.Peers; - internal IProtocol Protocol { get; private set; } // FIXME: We need some sort of configuration method for it. From 97d754ed9cc9bce3de83d55bb25bd44196ac093c Mon Sep 17 00:00:00 2001 From: Ko Chanhyuck Date: Thu, 19 Dec 2019 14:50:03 +0900 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ab2de4a587..77a8a0aad3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -62,7 +62,9 @@ To be released. - Added `StateDownloadState` class which reports state preloading iteration progress. [[#703]] - Added `PeerDiscoveryException` class which inherits `SwarmException` - class. [[#604], [#726]] + class. [[#604], [#726]] + - Added `Swarm.Peers` property which returns an enumerable of peers in + `Swarm`'s routing table. [[#739]] ### Behavioral changes @@ -136,6 +138,7 @@ To be released. [#728]: https://github.com/planetarium/libplanet/pull/728 [#734]: https://github.com/planetarium/libplanet/pull/734 [#736]: https://github.com/planetarium/libplanet/pull/736 +[#739]: https://github.com/planetarium/libplanet/pull/739 Version 0.7.0