Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Nethermind/Nethermind.Xdc/Types/Timeout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ namespace Nethermind.Xdc.Types;
public class Timeout(ulong round, Signature? signature, ulong gapNumber) : IXdcPoolItem
{
private readonly TimeoutDecoder _decoder = new();

public ulong Round { get; set; } = round;
public Signature? Signature { get; set; } = signature;
public ulong GapNumber { get; set; } = gapNumber;
public Address? Signer { get; set; }

public override string ToString() => $"{Round}:{GapNumber}";
public (ulong Round, Hash256 hash) PoolKey() => (Round, Keccak.Compute(_decoder.Encode(this, RlpBehaviors.ForSealing).Bytes));
}
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Xdc/XdcPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void EndRound(ulong round)
{
using var lockRelease = _lock.Acquire();
{
foreach (var key in _items.Keys.ToArray())
foreach (var key in _items.Keys)
{
if (key.Round <= round && _items.Remove(key, out ArrayPoolList<T> list))
{
Expand Down