Avoid false alarms on Backend on filter generation
MODIFY
WalletWasabi.Backend/Controllers/BlockchainController.cs
WalletWasabi.Backend/Controllers/BlockchainController.cs
@@ -433,6 +433,9 @@ namespace WalletWasabi.Backend.Controllers
status = new StatusResponse();
// Updating the status of the filters.
+ if (DateTimeOffset.UtcNow - Global.IndexBuilderService.LastFilterBuildTime > TimeSpan.FromMinutes(20))
+ {
+ // Checking if the last generated filter is created for one of the last two blocks on the blockchain.
var lastFilter = Global.IndexBuilderService.GetLastFilter();
var lastFilterHash = lastFilter.Header.BlockHash;
var bestHash = await RpcClient.GetBestBlockHashAsync();
@@ -443,6 +446,11 @@ namespace WalletWasabi.Backend.Controllers
{
status.FilterCreationActive = true;
}
+ }
+ else
+ {
+ status.FilterCreationActive = true;
+ }
// Updating the status of CoinJoin
var validInterval = TimeSpan.FromSeconds(Global.Coordinator.RoundConfig.InputRegistrationTimeout * 2);

MODIFY
WalletWasabi/Blockchain/BlockFilters/IndexBuilderService.cs
WalletWasabi/Blockchain/BlockFilters/IndexBuilderService.cs
@@ -74,6 +74,7 @@ namespace WalletWasabi.Blockchain.BlockFilters
public uint StartingHeight { get; }
public bool IsRunning => Interlocked.Read(ref _serviceStatus) == Running;
public bool IsStopping => Interlocked.Read(ref _serviceStatus) >= Stopping;
+ public DateTimeOffset LastFilterBuildTime { get; private set; }
public static GolombRiceFilter CreateDummyEmptyFilter(uint256 blockHash)
{
@@ -222,6 +223,7 @@ namespace WalletWasabi.Blockchain.BlockFilters
{
Logger.LogDebug($"Created filter for block: {nextHeight}.");
}
+ LastFilterBuildTime = DateTimeOffset.UtcNow;
}
catch (Exception ex)
{

Avoid false alarms on Backend on filter generation