Rename GetAsync in IRepository
MODIFY
WalletWasabi/Wallets/CachedBlockProvider.cs
WalletWasabi/Wallets/CachedBlockProvider.cs
@@ -28,7 +28,7 @@ namespace WalletWasabi.Wallets
/// <returns>The requested bitcoin block.</returns>
public async Task<Block> GetBlockAsync(uint256 hash, CancellationToken cancellationToken)
{
- Block? block = await BlockRepository.GetAsync(hash, cancellationToken).ConfigureAwait(false);
+ Block? block = await BlockRepository.TryGetAsync(hash, cancellationToken).ConfigureAwait(false);
if (block is null)
{
block = await BlockSourceProvider.GetBlockAsync(hash, cancellationToken).ConfigureAwait(false);

MODIFY
WalletWasabi/Wallets/FileSystemBlockRepository.cs
WalletWasabi/Wallets/FileSystemBlockRepository.cs
@@ -206,7 +206,7 @@ namespace WalletWasabi.Wallets
/// <param name="hash">The block's hash that identifies the requested block.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The requested bitcoin block.</returns>
- public async Task<Block?> GetAsync(uint256 hash, CancellationToken cancellationToken)
+ public async Task<Block?> TryGetAsync(uint256 hash, CancellationToken cancellationToken)
{
// Try get the block.
Block? block = null;

MODIFY
WalletWasabi/Wallets/IRepository.cs
WalletWasabi/Wallets/IRepository.cs
@@ -8,7 +8,7 @@ namespace WalletWasabi.Wallets
/// </summary>
public interface IRepository<TID, TElement>
{
- Task<TElement?> GetAsync(TID id, CancellationToken cancel);
+ Task<TElement?> TryGetAsync(TID id, CancellationToken cancel);
Task SaveAsync(TElement element, CancellationToken cancel);

Rename GetAsync in IRepository