Replace obsolate new Block() code
MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -683,7 +683,6 @@ namespace WalletWasabi.Tests
await wallet.InitializeAsync(cts.Token); // Initialize wallet service.
}
- await Task.Delay(1000); // magic wait, CI fails from time to time
var scp = new Key().ScriptPubKey;
var res2 = await wallet.BuildTransactionAsync("password", new[] { new WalletService.Operation(scp, new Money(0.05m, MoneyUnit.BTC), "foo") }, 5, false);

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -366,7 +366,7 @@ namespace WalletWasabi.Services
if (hash == new uint256(fileName))
{
var blockBytes = await File.ReadAllBytesAsync(filePath);
- return new Block(blockBytes, IndexDownloader.Network.Consensus);
+ return Block.Load(blockBytes, IndexDownloader.Network);
}
}
}

Replace obsolate new Block() code