public BranchedChain(PendingBlock first) { PendingBlocks.Add(first); PendingBlocks.SortByBlockIndex(); EndHeight = PendingBlocks.Last().Block.Header.Index; }
public BranchedChain(IEnumerable <PendingBlock> list, PendingBlock last) { foreach (var pendingBlock in list) { PendingBlocks.Add(pendingBlock); } PendingBlocks.Add(last); PendingBlocks.SortByBlockIndex(); EndHeight = PendingBlocks.Last().Block.Header.Index; }
public BranchedChain(PendingBlock first, IReadOnlyCollection <PendingBlock> list) { PendingBlocks.Add(first); foreach (var pendingBlock in list) { PendingBlocks.Add(pendingBlock); } PendingBlocks.SortByBlockIndex(); EndHeight = PendingBlocks.Last().Block.Header.Index; }
public BranchedChain(IEnumerable <PendingBlock> list1, IReadOnlyCollection <PendingBlock> list2) { foreach (var pendingBlock in list1) { PendingBlocks.Add(pendingBlock); } foreach (var pendingBlock in list2) { PendingBlocks.Add(pendingBlock); } PendingBlocks.SortByBlockIndex(); EndHeight = PendingBlocks.Last().Block.Header.Index; }