Add backend status.
MODIFY
WalletWasabi.Gui/Controls/StatusBar.xaml
WalletWasabi.Gui/Controls/StatusBar.xaml
<Grid Background="{DynamicResource ThemeAccentBrush}">
<DockPanel LastChildFill="True" Margin="10 0">
<StackPanel Orientation="Horizontal" Gap="4" DockPanel.Dock="Right">
+
<Grid Height="10" Width="10">
<DrawingPresenter VerticalAlignment="Center" HorizontalAlignment="Center">
<DrawingPresenter.Drawing>
<TextBlock>Tor:</TextBlock>
<TextBlock Text="{Binding Tor}" />
+ <Grid Height="10" Width="10">
+ <DrawingPresenter VerticalAlignment="Center" HorizontalAlignment="Center">
+ <DrawingPresenter.Drawing>
+ <DrawingGroup>
+ <DrawingGroup.Children>
+ <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
+ <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M6,0L6,5.036C6,5.021 5.669,5 5.5,5 2.461,5 0.00100000000000033,7.462 0.00100000000000033,10.5 0.00100000000000033,13.537 2.462,16 5.5,16 5.67,16 6,15.977 6,15.961L6,16 10.973,16 16,16 16,0z" />
+ <GeometryDrawing Brush="#FF414141" Geometry="F1M13.028,13L12.028,13 12.028,12 13.028,12z M9,5L13,5 13,6 9,6z M9,3L13,3 13,4 9,4z M7,1L7,5.135C9.276,5.75 10.971,7.759 11.053,10.235 11.059,10.316 11.066,10.368 11.066,10.421 11.066,11.3 10.843,12.121 10.478,12.859 10.429,12.964 10.379,13.068 10.323,13.17 10.269,13.264 10.215,13.355 10.155,13.445 9.77,14.054 9.274,14.586 8.685,15L15,15 15,1z" />
+ <GeometryDrawing Brush="#FF414141" Geometry="F1M6.4619,14.0049C6.8119,13.2679 7.0819,12.5809 7.2569,11.9509 7.8309,11.8779 8.4419,11.7319 9.1109,11.4799 8.7399,12.7239 7.7299,13.6919 6.4619,14.0049 M2.0259,11.4649C2.5399,11.6219 3.1279,11.7749 3.7909,11.8799 3.9229,12.5529 4.1399,13.2389 4.4219,13.9329 3.2709,13.5559 2.3709,12.6319 2.0259,11.4649 M1.8749,10.4209C1.8749,9.8959 1.9869,9.3959 2.1849,8.9409 2.6249,9.0709 3.1169,9.1939 3.6629,9.2859 3.6359,9.5479 3.6169,9.8149 3.6139,10.0969 3.6099,10.4389 3.6349,10.7909 3.6769,11.1479 2.9849,11.0219 2.3889,10.8489 1.8889,10.6809 1.8819,10.5949 1.8749,10.5089 1.8749,10.4209 M4.2319,6.9789C4.0459,7.4429 3.8759,7.9779 3.7609,8.5909 3.3169,8.5129 2.9109,8.4159 2.5389,8.3109 2.9549,7.7129 3.5439,7.2459 4.2319,6.9789 M5.5709,6.7249C5.6779,6.7249 5.7809,6.7329 5.8839,6.7399 6.1859,7.2619 6.4909,7.9269 6.6699,8.7369 6.3029,8.7629 5.9409,8.7669 5.5749,8.7629 5.1899,8.7589 4.8159,8.7339 4.4569,8.6919 4.6069,7.9099 4.8549,7.2679 5.1009,6.7579 5.2549,6.7379 5.4109,6.7249 5.5709,6.7249 M5.5749,11.3349C5.1649,11.3289 4.7509,11.2999 4.3709,11.2559 4.3169,10.8639 4.3109,10.4779 4.3149,10.1029 4.3169,9.8559 4.3349,9.5959 4.3579,9.3649 4.7449,9.4089 5.1479,9.4209 5.5669,9.4209L5.8259,9.4209C6.1409,9.4209 6.4579,9.4329 6.7819,9.4089 6.8079,9.6279 6.8259,9.8599 6.8279,10.0919 6.8319,10.4639 6.7839,10.8699 6.6929,11.2999 6.3169,11.3249 5.9489,11.3369 5.5749,11.3349 M5.5709,14.1169C5.4619,14.1169 5.3549,14.1089 5.2469,14.0999 4.9249,13.3829 4.6769,12.6699 4.5229,11.9759 4.8579,12.0089 5.2079,12.0319 5.5669,12.0339 5.6529,12.0359 5.7409,12.0359 5.8259,12.0359 6.0499,12.0359 6.2759,12.0299 6.5039,12.0189 6.3079,12.6559 6.0169,13.3539 5.6339,14.1129 5.6119,14.1139 5.5929,14.1169 5.5709,14.1169 M8.6239,8.3369C8.1829,8.4889 7.7679,8.5949 7.3689,8.6559 7.2319,7.9949 7.0159,7.4229 6.7799,6.9309 7.5369,7.1929 8.1809,7.6899 8.6239,8.3369 M7.4799,9.3539C7.9459,9.2799 8.4409,9.1549 8.9689,8.9659 9.1579,9.4109 9.2679,9.9029 9.2679,10.4209 9.2679,10.5009 9.2599,10.5809 9.2559,10.6609 8.5879,10.9519 7.9869,11.1259 7.4249,11.2159 7.4949,10.8229 7.5329,10.4479 7.5289,10.0969 7.5259,9.8379 7.5049,9.5939 7.4799,9.3539 M10.0699,10.4209C10.0699,10.3679 10.0629,10.3189 10.0629,10.2689 9.9829,7.8549 8.0059,5.9209 5.5709,5.9209 3.0859,5.9209 1.0709,7.9359 1.0709,10.4209 1.0709,10.5529 1.0789,10.6809 1.0909,10.8099 1.1009,10.9249 1.1179,11.0379 1.1359,11.1509 1.1359,11.1549 1.1359,11.1579 1.1379,11.1629 1.4509,13.0539 2.9409,14.5429 4.8339,14.8549 4.8389,14.8559 4.8429,14.8569 4.8469,14.8569 4.9589,14.8759 5.0709,14.8919 5.1849,14.9009 5.3129,14.9129 5.4409,14.9209 5.5709,14.9209 5.7199,14.9209 5.8659,14.9119 6.0109,14.8999 8.2889,14.6769 10.0699,12.7579 10.0699,10.4209" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M7.436,9.3623C7.899,9.2893 8.413,9.1653 8.936,8.9773 9.125,9.4203 9.201,9.9073 9.201,10.4213 9.201,10.5013 9.193,10.5803 9.189,10.6593 8.528,10.9473 7.932,11.1203 7.373,11.2103 7.444,10.8193 7.481,10.4483 7.477,10.0983 7.474,9.8423 7.461,9.6003 7.436,9.3623" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M5.5356,14.0869C5.4276,14.0869 5.3206,14.0809 5.2146,14.0709 4.8936,13.3599 4.6476,12.6089 4.4956,11.9209 4.8286,11.9539 5.1796,12.0189 5.5356,12.0209 5.6216,12.0229 6.2346,12.0319 6.4606,12.0209 6.2656,12.6529 5.9766,13.3289 5.5986,14.0829 5.5766,14.0839 5.5566,14.0869 5.5356,14.0869" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M5.5396,11.3271C5.1336,11.3221 4.7436,11.2641 4.3676,11.2211 4.3066,10.7791 4.2916,10.4441 4.2956,10.1211 4.2976,9.8761 4.3116,9.5981 4.3356,9.3701 4.7196,9.4131 5.1196,9.4211 5.5356,9.4211 5.6216,9.4211 5.4506,9.4211 5.5356,9.4211 5.8476,9.4211 6.4146,9.4441 6.7356,9.4211 6.7616,9.6381 6.7336,9.8631 6.7356,10.0931 6.7396,10.4611 6.7256,10.8651 6.6356,11.2911 6.2626,11.3161 5.9106,11.3291 5.5396,11.3271" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M1.8696,10.4209C1.8696,9.8999 1.9806,9.3709 2.1776,8.9209 2.6136,9.0499 3.0936,9.2039 3.6356,9.2959 3.6096,9.5559 3.5976,9.7409 3.5946,10.0209 3.5906,10.3599 3.5946,10.7879 3.6356,11.1419 2.9506,11.0169 2.3796,10.8459 1.8836,10.6789 1.8766,10.5929 1.8696,10.5079 1.8696,10.4209" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M2.02,11.5205C2.529,11.6765 3.112,11.8155 3.77,11.9205 3.901,12.5875 4.116,13.2155 4.396,13.9035 3.254,13.5305 2.362,12.6775 2.02,11.5205" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M6.4185,13.9756C6.7665,13.2446 7.0335,12.5456 7.2075,11.9206 7.7765,11.8486 8.3835,11.7706 9.0465,11.5206 8.6785,12.7546 7.6765,13.6636 6.4185,13.9756" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M8.5884,8.3213C8.1474,8.4733 7.7324,8.5593 7.3334,8.6213 7.1954,7.9603 6.9804,7.4133 6.7444,6.9213 7.5014,7.1823 8.1454,7.6733 8.5884,8.3213" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M5.5356,6.8208C5.6416,6.8208 5.7456,6.8128 5.8486,6.8208 6.1496,7.3428 6.4556,7.9098 6.6346,8.7208 6.2666,8.7458 5.9056,8.7248 5.5396,8.7208 5.1536,8.7168 4.7956,8.6618 4.4356,8.6208 4.5856,7.8398 4.7896,7.3308 5.0356,6.8208 5.1896,6.8008 5.3756,6.8208 5.5356,6.8208" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M4.1963,6.9785C4.0103,7.4435 3.8403,7.9775 3.7253,8.5905 3.2813,8.5125 2.8753,8.4165 2.5033,8.3105 2.9193,7.7125 3.5083,7.2465 4.1963,6.9785" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M13.028,4L9.028,4 9.028,3 13.028,3z" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M13.028,5L9.028,5 9.028,6 13.028,6z" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M13.028,12L12.028,12 12.028,13 13.028,13z" />
+ </DrawingGroup.Children>
+ </DrawingGroup>
+ </DrawingPresenter.Drawing>
+ </DrawingPresenter>
+ </Grid>
+ <TextBlock>Backend:</TextBlock>
+ <TextBlock Text="{Binding Backend}" />
+
<Grid Height="10" Width="10">
<DrawingPresenter VerticalAlignment="Center" HorizontalAlignment="Center">
<DrawingPresenter.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
- <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M14,2L14,3.27 10,8.351 10,13 7,13 6,13 2,13 2,8 5.724,8 2,3.27 2,2z" />
- <GeometryDrawing Brush="#FF424242" Geometry="F1M3,10L6,10 6,9 3,9z M3,11L6,11 6,12 3,12z M13,3L9,8 9,12 7,12 7,8 3,3z" />
+ <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M0,3.0004L0,4.2764 3,9.2774 3,14.0004 7,14.0004 7,9.9204 11.522,14.4434 16,9.9484 16,9.4004 14.154,7.5544 13.006,8.6994 13.006,3.0044 10.765,3.0044 10.767,3.0004z M7,9.2774L10.006,4.2674 10.006,8.6824 8.874,7.5554 7,9.4304z" />
+ <GeometryDrawing Brush="#FF424242" Geometry="F1M9,4L6,9 6,13 4,13 4,9 1,4z" />
+ <GeometryDrawing Brush="#FF00539C" Geometry="F1M14.1504,8.9678L14.8574,9.6748 11.5174,13.0278 8.1654,9.6748 8.8724,8.9678 11.0034,11.0898 11.0034,4.0038 12.0034,4.0038 12.0034,11.1078z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingPresenter.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
- <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M15,9L12,9 12,12 9,12 9,15 1,15 1,7 4,7 4,4 7,4 7,1 15,1z" />
- <GeometryDrawing Brush="#FF424242" Geometry="F1M13,7L11,7 11,5 9,5 9,3 13,3z M10,10L8,10 8,8 6,8 6,6 10,6z M7,13L3,13 3,9 7,9z M8,2L8,5 5,5 5,8 2,8 2,14 8,14 8,11 11,11 11,8 14,8 14,2z" />
- <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M3,13L7,13 7,9 3,9z M6,6L6,8 8,8 8,10 10,10 10,6z M13,3L13,7 11,7 11,5 9,5 9,3z" />
+ <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M2.5002,-0.000199999999999534L0.000199999999999978,2.4998 2.0002,4.4998 2.0002,6.9998 5.0002,6.9998 3.9992,7.9998 5.0002,7.9998 5.0002,14.9998 15.0002,14.9998 15.0002,1.9998 8.0002,1.9998 8.0002,0.9998 5.0002,0.9998 6.0002,-0.000199999999999534z" />
+ <GeometryDrawing Brush="#FF414141" Geometry="F1M12,8L13,8 13,9 12,9z M6,8L6,10 14,10 14,7 8.5,7 7.5,8z M12,12L13,12 13,13 12,13z M6,14L14,14 14,11 6,11z M12,4L13,4 13,5 12,5z M10,5.5L9.5,6 14,6 14,3 8,3 8,3.5z" />
+ <GeometryDrawing Brush="#FF00529C" Geometry="F1M8.5166,5.5L6.9996,7 5.9996,7 6.9996,6 2.9996,6 2.9996,5 6.9996,5 5.9996,4 6.9996,4z" />
+ <GeometryDrawing Brush="#FF00529C" Geometry="F1M4,4L3,3 7,3 7,2 3,2 4,1 3,1 1.517,2.5 3,4z" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M12,5L13,5 13,4 12,4z M12,9L13,9 13,8 12,8z M12,13L13,13 13,12 12,12z" />
</DrawingGroup.Children>
</DrawingGroup>
</DrawingPresenter.Drawing>

MODIFY
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
@@ -16,6 +16,17 @@ namespace WalletWasabi.Gui.ViewModels
public MemPoolService MemPoolService { get; }
public IndexDownloader IndexDownloader { get; }
+ private BackendStatus _backend;
+
+ public BackendStatus Backend
+ {
+ get { return _backend; }
+ set
+ {
+ this.RaiseAndSetIfChanged(ref _backend, value);
+ }
+ }
+
private TorStatus _tor;
public TorStatus Tor
@@ -94,6 +105,7 @@ namespace WalletWasabi.Gui.ViewModels
IndexDownloader.NewFilter += IndexDownloader_NewFilter;
IndexDownloader.BestHeightChanged += IndexDownloader_BestHeightChanged;
IndexDownloader.TorStatusChanged += IndexDownloader_TorStatusChanged;
+ IndexDownloader.BackendStatusChanged += IndexDownloader_BackendStatusChanged;
FiltersLeft = IndexDownloader.GetFiltersLeft();
@@ -127,6 +139,11 @@ namespace WalletWasabi.Gui.ViewModels
}
}
+ private void IndexDownloader_BackendStatusChanged(object sender, BackendStatus e)
+ {
+ Backend = e;
+ }
+
private void IndexDownloader_TorStatusChanged(object sender, TorStatus e)
{
Tor = e;
@@ -173,6 +190,7 @@ namespace WalletWasabi.Gui.ViewModels
IndexDownloader.NewFilter -= IndexDownloader_NewFilter;
IndexDownloader.BestHeightChanged -= IndexDownloader_BestHeightChanged;
IndexDownloader.TorStatusChanged -= IndexDownloader_TorStatusChanged;
+ IndexDownloader.BackendStatusChanged -= IndexDownloader_BackendStatusChanged;
}
_disposedValue = true;

MODIFY
WalletWasabi/Services/IndexDownloader.cs
WalletWasabi/Services/IndexDownloader.cs
@@ -61,6 +61,24 @@ namespace WalletWasabi.Services
public event EventHandler<TorStatus> TorStatusChanged;
+ private BackendStatus _backendStatus;
+
+ public BackendStatus BackendStatus
+ {
+ get => _backendStatus;
+
+ private set
+ {
+ if (_backendStatus != value)
+ {
+ _backendStatus = value;
+ BackendStatusChanged?.Invoke(this, value);
+ }
+ }
+ }
+
+ public event EventHandler<BackendStatus> BackendStatusChanged;
+
public int GetFiltersLeft()
{
if (BestHeight == Height.Unknown || BestHeight == Height.MemPool || BestKnownFilter.BlockHeight == Height.Unknown || BestKnownFilter.BlockHeight == Height.MemPool)
@@ -180,18 +198,27 @@ namespace WalletWasabi.Services
FiltersResponse filtersResponse = null;
try
{
- await WasabiClient.GetFiltersAsync(BestKnownFilter.BlockHash, 1000, Cancel.Token);
+ filtersResponse = await WasabiClient.GetFiltersAsync(BestKnownFilter.BlockHash, 1000, Cancel.Token);
}
catch (ConnectionException)
{
TorStatus = TorStatus.NotRunning;
+ BackendStatus = BackendStatus.Online;
+ throw;
+ }
+ catch (TorSocks5FailureResponseException)
+ {
+ TorStatus = TorStatus.Running;
+ BackendStatus = BackendStatus.Offline;
throw;
}
- catch
+ catch (Exception ex)
{
TorStatus = TorStatus.Running;
+ BackendStatus = BackendStatus.Online;
throw;
}
+ BackendStatus = BackendStatus.Online;
TorStatus = TorStatus.Running;
if (filtersResponse == null) // no-content, we are synced

Add backend status.