Exemplo n.º 1
0
 public Task UpdateLastProcessedBlockHeightAsync(int currentBlock)
 {
     return(_tableStorage.InsertOrReplaceAsync(LastProcessedBlockEntity.Create(currentBlock)));
 }
Exemplo n.º 2
0
        public async Task <int> GetMinBlockHeight()
        {
            var records = await _tableStorage.GetDataAsync(LastProcessedBlockEntity.GeneratePartitionKey());

            return(records.DefaultIfEmpty().Min(x => x?.BlockHeight ?? 0));
        }
Exemplo n.º 3
0
 public async Task <int?> GetLastProcessedBlockHeightAsync()
 {
     return((await _tableStorage.GetDataAsync(LastProcessedBlockEntity.GeneratePartitionKey(), LastProcessedBlockEntity.GenerateRowKey()))?.BlockHeight);
 }