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

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