Skip to content

Commit

Permalink
Made NetMQRuntime count configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
wwhurin committed Dec 14, 2019
1 parent ec000bd commit 09ef81b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ To be released.
`BlockChain<T>()` constructor. [[#688]]
- Removed `StateReferenceDownloadState` class. [[#703]]
- Removed `BlockStateDownloadState` class. [[#703]]
- Added `workers` optional parameter into `Swarm<T>()` constructor.
[[#613], [#727]]

### Backward-incompatible network protocol changes

Expand Down Expand Up @@ -88,6 +90,7 @@ To be released.
nonce. [[#718]]
- Fixed a bug where mined transactions were staged again. [[#719]]

[#613]: https://github.com/planetarium/libplanet/issues/613
[#662]: https://github.com/planetarium/libplanet/pull/662
[#665]: https://github.com/planetarium/libplanet/pull/665
[#675]: https://github.com/planetarium/libplanet/pull/675
Expand All @@ -105,6 +108,7 @@ To be released.
[#709]: https://github.com/planetarium/libplanet/pull/709
[#718]: https://github.com/planetarium/libplanet/pull/718
[#719]: https://github.com/planetarium/libplanet/pull/719
[#727]: https://github.com/planetarium/libplanet/pull/727


Version 0.7.0
Expand Down
1 change: 1 addition & 0 deletions Libplanet.Tests/Net/SwarmTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2543,6 +2543,7 @@ private Swarm<T> CreateSwarm<T>(
appProtocolVersion,
tableSize,
bucketSize,
5,
host,
listenPort,
createdAt,
Expand Down
4 changes: 3 additions & 1 deletion Libplanet/Net/Swarm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public Swarm(
BlockChain<T> blockChain,
PrivateKey privateKey,
int appProtocolVersion,
int workers = 5,
string host = null,
int? listenPort = null,
DateTimeOffset? createdAt = null,
Expand All @@ -96,6 +97,7 @@ public Swarm(
appProtocolVersion,
null,
null,
workers,
host,
listenPort,
createdAt,
Expand All @@ -110,6 +112,7 @@ internal Swarm(
int appProtocolVersion,
int? tableSize,
int? bucketSize,
int workers = 5,
string host = null,
int? listenPort = null,
DateTimeOffset? createdAt = null,
Expand Down Expand Up @@ -174,7 +177,6 @@ internal Swarm(
{
using (var runtime = new NetMQRuntime())
{
const int workers = 5;
Task[] workerTasks = new Task[workers];
for (int i = 0; i < workers; i++)
Expand Down

0 comments on commit 09ef81b

Please sign in to comment.