/// <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)); }
/// <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); }