Uncomment buggy code for deployment.
MODIFY
WalletWasabi.Backend/Controllers/BlockchainController.cs
WalletWasabi.Backend/Controllers/BlockchainController.cs
@@ -141,14 +141,29 @@ namespace WalletWasabi.Backend.Controllers
internal async Task<AllFeeEstimate> GetAllFeeEstimateAsync(EstimateSmartFeeMode mode)
{
var cacheKey = $"{nameof(GetAllFeeEstimateAsync)}_{mode}";
- return await Cache.AtomicGetOrCreateAsync(
- cacheKey,
- entry =>
+
+ if (Cache.TryGetValue(cacheKey, out AllFeeEstimate allFeeEstimate))
+ {
+ return allFeeEstimate;
+ }
+ else
{
- entry.SetAbsoluteExpiration(TimeSpan.FromSeconds(500));
+ var ret = await RpcClient.EstimateAllFeeAsync(mode, simulateIfRegTest: true, tolerateBitcoinCoreBrainfuck: true);
+ Cache.Set(cacheKey, ret, TimeSpan.FromMinutes(500));
+ return ret;
+ }
- return RpcClient.EstimateAllFeeAsync(mode, simulateIfRegTest: true, tolerateBitcoinCoreBrainfuck: true);
- });
+ // ToDo: fix calling AtomicGetOrCreateAsync from AtomicGetOrCreateAsync
+ //return await Cache.AtomicGetOrCreateAsync(
+ // cacheKey,
+ // entry =>
+ // {
+ // entry.SetAbsoluteExpiration(TimeSpan.FromMinutes(500));
+
+ // Count2++;
+ // Logger.LogCritical($"{Count2}");
+ // return RpcClient.EstimateAllFeeAsync(mode, simulateIfRegTest: true, tolerateBitcoinCoreBrainfuck: true);
+ // });
}
/// <summary>

Uncomment buggy code for deployment.