Skip to content

Commit

Permalink
Made NetMQRuntime count configurable
Browse files Browse the repository at this point in the history
Closes #613
  • Loading branch information
wwhurin committed Dec 14, 2019
1 parent 243f4a0 commit e08a220
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGES.md
Expand Up @@ -33,8 +33,10 @@ To be released.
`BlockChain<T>()` constructor. [[#688]]
- Removed `StateReferenceDownloadState` class. [[#703]]
- Removed `BlockStateDownloadState` class. [[#703]]
- Removed `TxReceived`, `BlockReceived` `AsyncAutoResetEvent`
- Removed `TxReceived` and `BlockReceived` `AsyncAutoResetEvent`s
from `Swarm<T>`. [[#705], [#725]]
- Added `workers` optional parameter into `Swarm<T>()` constructor.
[[#613], [#727]]

### Backward-incompatible network protocol changes

Expand Down Expand Up @@ -90,6 +92,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 @@ -109,6 +112,7 @@ To be released.
[#718]: https://github.com/planetarium/libplanet/pull/718
[#719]: https://github.com/planetarium/libplanet/pull/719
[#725]: https://github.com/planetarium/libplanet/pull/725
[#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
Expand Up @@ -2543,6 +2543,7 @@ public async Task DoNotReceiveBlockFromNodeHavingDifferenceGenesisBlock()
appProtocolVersion,
tableSize,
bucketSize,
5,
host,
listenPort,
createdAt,
Expand Down
4 changes: 3 additions & 1 deletion Libplanet/Net/Swarm.cs
Expand Up @@ -84,6 +84,7 @@ static 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 @@ static Swarm()
appProtocolVersion,
null,
null,
workers,
host,
listenPort,
createdAt,
Expand All @@ -110,6 +112,7 @@ static 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 @@ static 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 e08a220

Please sign in to comment.