Example #1
0
        public BranchedChain(PendingBlock first)
        {
            PendingBlocks.Add(first);

            PendingBlocks.SortByBlockIndex();
            EndHeight = PendingBlocks.Last().Block.Header.Index;
        }
Example #2
0
        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;
        }
Example #3
0
        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;
        }
Example #4
0
        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;
        }