Skip to content

Commit

Permalink
Apply suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Sep 23, 2019
1 parent a4e3309 commit afa139d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Libplanet.Tests/Net/SwarmTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,9 @@ CancellationToken cancellationToken
var block = await chain.MineBlock(_fx1.Address1);
Log.Debug(
$"Block mined. " +
$"[Swarm: {swarm.Address}, Block: {block.Hash}]");
"Block mined. [Node: {0}, Block: {1}]",
swarm.Address,
block.Hash);
swarm.BroadcastBlocks(new[] { block });
}
catch (OperationCanceledException)
Expand Down
3 changes: 1 addition & 2 deletions Libplanet/Blocks/Block.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ public static Block<T> Mine(
return stamp;
},
difficulty,
cancellationToken
);
cancellationToken);

return MakeBlock(nonce);
}
Expand Down
5 changes: 4 additions & 1 deletion Libplanet/Hashcash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public static class Hashcash
/// <see cref="Nonce"/> value.</param>
/// <param name="difficulty">A number to calculate the target number
/// for which the returned answer should be less than.</param>
/// <param name="cancellationToken">A cts.</param>
/// <param name="cancellationToken">
/// A cancellation token used to propagate notification that this
/// operation should be canceled.
/// </param>
/// <returns>A <see cref="Nonce"/> value which satisfies the given
/// <paramref name="difficulty"/>.</returns>
/// <seealso cref="Stamp"/>
Expand Down

0 comments on commit afa139d

Please sign in to comment.