Skip to content

Commit

Permalink
Merge pull request #5880 from molnard/backport
Browse files Browse the repository at this point in the history
[Backport 1.1.12.9] Cherry-picking
  • Loading branch information
molnard committed Jun 2, 2021
2 parents 70a393e + 559ffbf commit 8803b3f
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 18 deletions.
15 changes: 12 additions & 3 deletions WalletWasabi.Gui/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,19 @@ public async Task InitializeNoWalletAsync()

#region BitcoinStoreInitialization

await bstoreInitTask.ConfigureAwait(false);
try
{
await bstoreInitTask.ConfigureAwait(false);

// Make sure that the height of the wallets will not be better than the current height of the filters.
WalletManager.SetMaxBestHeight(BitcoinStore.IndexStore.SmartHeaderChain.TipHeight);
// Make sure that the height of the wallets will not be better than the current height of the filters.
WalletManager.SetMaxBestHeight(BitcoinStore.IndexStore.SmartHeaderChain.TipHeight);
}
catch (Exception ex) when (!(ex is OperationCanceledException))
{
// If our internal data structures in the Bitcoin Store gets corrupted, then it's better to rescan all the wallets.
WalletManager.SetMaxBestHeight(SmartHeader.GetStartingHeader(Network).Height);
throw;
}

#endregion BitcoinStoreInitialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public RecoverWalletViewModel(WalletManagerViewModel owner) : base("Recover Wall

this.ValidateProperty(x => x.Password, ValidatePassword);
this.ValidateProperty(x => x.MinGapLimit, ValidateMinGapLimit);
this.ValidateProperty(x => x.AccountKeyPath, ValidateKeyPath);
this.ValidateProperty(x => x.AccountKeyPath, ValidateAccountKeyPath);

MnemonicWords = "";

Expand Down Expand Up @@ -223,13 +223,21 @@ private void ValidateMinGapLimit(IValidationErrors errors)
}
}

private void ValidateKeyPath(IValidationErrors errors)
private void ValidateAccountKeyPath(IValidationErrors errors)
{
if (string.IsNullOrWhiteSpace(AccountKeyPath))
{
errors.Add(ErrorSeverity.Error, "Path is not valid.");
}
else if (!KeyPath.TryParse(AccountKeyPath, out _))
else if (KeyPath.TryParse(AccountKeyPath, out var keyPath))
{
var accountKeyPath = keyPath.GetAccountKeyPath();
if (keyPath.Length != accountKeyPath.Length || accountKeyPath.Length != KeyManager.DefaultAccountKeyPath.Length)
{
errors.Add(ErrorSeverity.Error, "Path is not a compatible account derivation path.");
}
}
else
{
errors.Add(ErrorSeverity.Error, "Path is not a valid derivation path.");
}
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Gui/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@
},
"NBitcoin": {
"type": "Transitive",
"resolved": "5.0.73",
"contentHash": "Vre+l+Hx8uo+5Eq2T2uvq5kY+7YeccfvvUpfIj9YJrXI0j89gxsobfKfDhCw35gOIfSwIEDGv2N7LVbSA8w6HQ==",
"resolved": "5.0.81",
"contentHash": "sBOvupELGlaw5mr4sNW0q8kwc6ALlYaG6telvebDLU7+9DYYYaPiHS1L8gPIa4BKpSO/9STQkMRbKmW7DcAUfQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.2"
Expand Down Expand Up @@ -2272,7 +2272,7 @@
"dependencies": {
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "3.1.1",
"Microsoft.Win32.Registry": "4.7.0",
"NBitcoin": "5.0.73",
"NBitcoin": "5.0.81",
"NBitcoin.Secp256k1": "1.0.10"
}
}
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi.Packager/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
},
"NBitcoin": {
"type": "Transitive",
"resolved": "5.0.73",
"contentHash": "Vre+l+Hx8uo+5Eq2T2uvq5kY+7YeccfvvUpfIj9YJrXI0j89gxsobfKfDhCw35gOIfSwIEDGv2N7LVbSA8w6HQ==",
"resolved": "5.0.81",
"contentHash": "sBOvupELGlaw5mr4sNW0q8kwc6ALlYaG6telvebDLU7+9DYYYaPiHS1L8gPIa4BKpSO/9STQkMRbKmW7DcAUfQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.2"
Expand Down Expand Up @@ -293,7 +293,7 @@
"dependencies": {
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "3.1.1",
"Microsoft.Win32.Registry": "4.7.0",
"NBitcoin": "5.0.73",
"NBitcoin": "5.0.81",
"NBitcoin.Secp256k1": "1.0.10"
}
}
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi/Helpers/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static class Constants

public const long MaxSatoshisSupply = 2_100_000_000_000_000L;

public static readonly Version ClientVersion = new Version(1, 1, 12, 8);
public static readonly Version ClientVersion = new Version(1, 1, 12, 9);
public static readonly Version HwiVersion = new Version("2.0.2");
public static readonly Version BitcoinCoreVersion = new Version("0.21.0");
public static readonly Version LegalDocumentsVersion = new Version(2, 0);
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi/WalletWasabi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
<PackageReference Include="NBitcoin" Version="5.0.73" />
<PackageReference Include="NBitcoin" Version="5.0.81" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="NBitcoin.Secp256k1" Version="1.0.10" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions WalletWasabi/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
},
"NBitcoin": {
"type": "Direct",
"requested": "[5.0.73, )",
"resolved": "5.0.73",
"contentHash": "Vre+l+Hx8uo+5Eq2T2uvq5kY+7YeccfvvUpfIj9YJrXI0j89gxsobfKfDhCw35gOIfSwIEDGv2N7LVbSA8w6HQ==",
"requested": "[5.0.81, )",
"resolved": "5.0.81",
"contentHash": "sBOvupELGlaw5mr4sNW0q8kwc6ALlYaG6telvebDLU7+9DYYYaPiHS1L8gPIa4BKpSO/9STQkMRbKmW7DcAUfQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.2"
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-20.04'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core 3'
Expand Down

0 comments on commit 8803b3f

Please sign in to comment.