Пример #1
0
        /// <summary>
        /// Add <see cref="MerklePath"/> for tx root of a block indexed by parent chain.
        /// </summary>
        /// <param name="chainId">Child chain id</param>
        /// <param name="height">Child chain height</param>
        /// <returns></returns>
        public async Task <MerklePath> GetIndexedTxRootMerklePathInParentChain(Hash chainId, ulong height)
        {
            var key = DataPath.CalculatePointerForIndexedTxRootMerklePathByHeight(chainId, height);

            return(await _dataStore.GetAsync <MerklePath>(key));
        }
Пример #2
0
 /// <summary>
 /// Add <see cref="MerklePath"/> for tx root of a block indexed by parent chain.
 /// </summary>
 /// <param name="path"></param>
 /// <param name="chainId">Child chain id</param>
 /// <param name="height">Child chain height</param>
 /// <returns></returns>
 public async Task AddIndexedTxRootMerklePathInParentChain(MerklePath path, Hash chainId, ulong height)
 {
     var key = DataPath.CalculatePointerForIndexedTxRootMerklePathByHeight(chainId, height);
     await _dataStore.InsertAsync(key, path);
 }