Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Jan 3, 2020
1 parent 7b8a50b commit cc6edb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ To be released.
continuous. [[#732]]
- `Swarm<T>` became to can process more requests at once by creating TURN
relaying proxy concurrently. [[#744]]
- `Swarm<T>` became to throw `InvalidGenesisBlockException` when receiving the
genesis block of other network chain. [[#746]]
- `Swarm<T>` became to throw `InvalidGenesisBlockException` when receiving
block from the nodes that have a different genesis block. [[#746]]

### Bug fixes

Expand Down
18 changes: 9 additions & 9 deletions Libplanet.Tests/Net/SwarmTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2612,15 +2612,15 @@ BlockChain<DumbAction> MakeBlockChain() => TestUtils.MakeBlockChain(

await swarmA.AddPeersAsync(new[] { swarmB.AsPeer }, null);
Assert.NotEqual(chainA.Genesis, chainB.Genesis);
try
{
await swarmA.PreloadAsync();
}
catch (AggregateException exception)
{
var exceptions = exception.InnerExceptions.OfType<InvalidGenesisBlockException>();
Assert.True(exceptions.Any());
}
Task t = swarmA.PreloadAsync();
await Assert.ThrowsAsync<AggregateException>(async () => await t);
var exception = t.Exception.InnerException?.InnerException;
Assert.IsType<InvalidGenesisBlockException>(exception);

await StopAsync(swarmA);
await StopAsync(swarmB);
swarmA.Dispose();
swarmB.Dispose();
}

[Fact(Timeout = Timeout)]
Expand Down

0 comments on commit cc6edb6

Please sign in to comment.