示例#1
0
        public void Can_get_leaves(uint nodesCount)
        {
            BaselineTree baselineTree = BuildATree();

            for (int i = 0; i < nodesCount; i++)
            {
                baselineTree.Insert(_testLeaves[0]);
            }

            var leafIndexes = Enumerable.Range(0, (int)nodesCount).Select(l => (uint)l).ToArray();
            var result      = baselineTree.GetLeaves(leafIndexes);

            for (int i = 0; i < result.Length; i++)
            {
                result[i].Hash.Should().NotBe(Keccak.Zero);
            }
        }