Exemple #1
0
        public async Task GetNonIndexedBlock_Test()
        {
            _crossChainTestHelper.SetFakeLibHeight(2);
            var res = await _crossChainService.GetNonIndexedBlockAsync(1);

            Assert.True(res.Height.Equals(1));
        }
        public async Task <SideChainBlockData> ResponseSideChainBlockDataAsync(long requestHeight)
        {
            var block = await _crossChainService.GetNonIndexedBlockAsync(requestHeight);

            if (block == null)
            {
                return(null);
            }

            return(new SideChainBlockData
            {
                Height = block.Height,
                BlockHeaderHash = block.GetHash(),
                TransactionStatusMerkleTreeRoot = block.Header.MerkleTreeRootOfTransactionStatus,
                ChainId = block.Header.ChainId
            });
        }