mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Remove segwit limitation for rescan
This commit is contained in:
@@ -654,7 +654,6 @@ namespace BTCPayServer.Tests
|
|||||||
var rescan = Assert.IsType<RescanWalletModel>(Assert.IsType<ViewResult>(walletController.WalletRescan(walletId).Result).Model);
|
var rescan = Assert.IsType<RescanWalletModel>(Assert.IsType<ViewResult>(walletController.WalletRescan(walletId).Result).Model);
|
||||||
Assert.False(rescan.Ok);
|
Assert.False(rescan.Ok);
|
||||||
Assert.True(rescan.IsFullySync);
|
Assert.True(rescan.IsFullySync);
|
||||||
Assert.True(rescan.IsSegwit);
|
|
||||||
Assert.False(rescan.IsSupportedByCurrency);
|
Assert.False(rescan.IsSupportedByCurrency);
|
||||||
Assert.False(rescan.IsServerAdmin);
|
Assert.False(rescan.IsServerAdmin);
|
||||||
|
|
||||||
|
|||||||
@@ -291,9 +291,6 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
var vm = new RescanWalletModel();
|
var vm = new RescanWalletModel();
|
||||||
vm.IsFullySync = _dashboard.IsFullySynched(walletId.CryptoCode, out var unused);
|
vm.IsFullySync = _dashboard.IsFullySynched(walletId.CryptoCode, out var unused);
|
||||||
// We need to ensure it is segwit,
|
|
||||||
// because hardware wallet support need the parent transactions to sign, which NBXplorer don't have. (Nor does a pruned node)
|
|
||||||
vm.IsSegwit = paymentMethod.DerivationStrategyBase.IsSegwit();
|
|
||||||
vm.IsServerAdmin = User.Claims.Any(c => c.Type == Policies.CanModifyServerSettings.Key && c.Value == "true");
|
vm.IsServerAdmin = User.Claims.Any(c => c.Type == Policies.CanModifyServerSettings.Key && c.Value == "true");
|
||||||
vm.IsSupportedByCurrency = _dashboard.Get(walletId.CryptoCode)?.Status?.BitcoinStatus?.Capabilities?.CanScanTxoutSet == true;
|
vm.IsSupportedByCurrency = _dashboard.Get(walletId.CryptoCode)?.Status?.BitcoinStatus?.Capabilities?.CanScanTxoutSet == true;
|
||||||
var explorer = ExplorerClientProvider.GetExplorerClient(walletId.CryptoCode);
|
var explorer = ExplorerClientProvider.GetExplorerClient(walletId.CryptoCode);
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
|||||||
public bool IsServerAdmin { get; set; }
|
public bool IsServerAdmin { get; set; }
|
||||||
public bool IsSupportedByCurrency { get; set; }
|
public bool IsSupportedByCurrency { get; set; }
|
||||||
public bool IsFullySync { get; set; }
|
public bool IsFullySync { get; set; }
|
||||||
public bool IsSegwit { get; set; }
|
public bool Ok => IsServerAdmin && IsSupportedByCurrency && IsFullySync;
|
||||||
public bool Ok => IsServerAdmin && IsSupportedByCurrency && IsFullySync && IsSegwit;
|
|
||||||
|
|
||||||
[Range(1000, 10_000)]
|
[Range(1000, 10_000)]
|
||||||
public int BatchSize { get; set; } = 3000;
|
public int BatchSize { get; set; } = 3000;
|
||||||
|
|||||||
@@ -36,14 +36,6 @@
|
|||||||
{
|
{
|
||||||
<p><span class="fa fa-times-circle" style="color:red;"></span> <span>This full node do not support rescan of the UTXO set</span></p>
|
<p><span class="fa fa-times-circle" style="color:red;"></span> <span>This full node do not support rescan of the UTXO set</span></p>
|
||||||
}
|
}
|
||||||
@if (Model.IsSegwit)
|
|
||||||
{
|
|
||||||
<p><span class="fa fa-check-circle" style="color:green;"></span> <span>This wallet is compatible with segwit</span></p>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<p><span class="fa fa-times-circle" style="color:red;"></span> <span>This wallet is not compatible with segwit</span></p>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user