Example #1
0
        public async Task <ILastBlock> GetLastBlock()
        {
            var partitionKey = LastImportedBlockHashEntity.GeneratePartitionKey();
            var rowKey       = LastImportedBlockHashEntity.GenerateRowKey();

            var entity = await _tableStorage.GetDataAsync(partitionKey, rowKey);

            return(entity);
        }
Example #2
0
        public Task SetAsync(string hash, long height)
        {
            var newEntity = LastImportedBlockHashEntity.Create(hash, height);

            return(_tableStorage.InsertOrReplaceAsync(newEntity));
        }