Add createwallet as Core has broke backwards compatibilty by not creating and loading wallets by default
MODIFY
WalletWasabi.Tests/UnitTests/BitcoinCore/P2pBasedTests.cs
WalletWasabi.Tests/UnitTests/BitcoinCore/P2pBasedTests.cs
@@ -35,6 +35,10 @@ namespace WalletWasabi.Tests.UnitTests.BitcoinCore
string dir = Common.GetWorkDir();
var network = coreNode.Network;
var rpc = coreNode.RpcClient;
+
+ var walletName = "wallet.dat";
+ await rpc.CreateWalletAsync(walletName);
+
await using IndexStore indexStore = new(Path.Combine(dir, "indexStore"), network, new SmartHeaderChain());
await using AllTransactionStore transactionStore = new(Path.Combine(dir, "transactionStore"), network);
MempoolService mempoolService = new();
@@ -106,6 +110,9 @@ namespace WalletWasabi.Tests.UnitTests.BitcoinCore
await rpc.GenerateAsync(101);
var network = rpc.Network;
+ var walletName = "wallet.dat";
+ await rpc.CreateWalletAsync(walletName);
+
var dir = Common.GetWorkDir();
using Key k = new Key();
@@ -151,6 +158,9 @@ namespace WalletWasabi.Tests.UnitTests.BitcoinCore
try
{
var rpc = coreNode.RpcClient;
+ var walletName = "wallet.dat";
+ await rpc.CreateWalletAsync(walletName);
+
BlockNotifier notifier = services.FirstOrDefault<BlockNotifier>();
// Make sure we get notification for one block.

MODIFY
WalletWasabi.Tests/UnitTests/BitcoinCore/RpcBasedTests.cs
WalletWasabi.Tests/UnitTests/BitcoinCore/RpcBasedTests.cs
@@ -187,6 +187,9 @@ namespace WalletWasabi.Tests.UnitTests.BitcoinCore
var rpc = coreNode.RpcClient;
var network = rpc.Network;
+ var walletName = "wallet.dat";
+ await rpc.CreateWalletAsync(walletName);
+
var key = new Key();
var blockId = await rpc.GenerateToAddressAsync(1, key.PubKey.WitHash.GetAddress(network));
var block = await rpc.GetBlockAsync(blockId[0]);

MODIFY
WalletWasabi.Tests/UnitTests/MockRpcClient.cs
WalletWasabi.Tests/UnitTests/MockRpcClient.cs
@@ -174,5 +174,10 @@ namespace WalletWasabi.Tests.UnitTests
{
throw new NotImplementedException();
}
+
+ public Task<RPCClient> CreateWalletAsync(string walletNameOrPath, CreateWalletOptions? options = null)
+ {
+ throw new NotImplementedException();
+ }
}
}

MODIFY
WalletWasabi/BitcoinCore/Rpc/IRPCClient.cs
WalletWasabi/BitcoinCore/Rpc/IRPCClient.cs
@@ -72,5 +72,7 @@ namespace WalletWasabi.BitcoinCore.Rpc
Task<VerboseBlockInfo> GetVerboseBlockAsync(uint256 blockId);
Task<uint256[]> GenerateToAddressAsync(int nBlocks, BitcoinAddress address);
+
+ Task<RPCClient> CreateWalletAsync(string walletNameOrPath, CreateWalletOptions? options = null);
}
}

MODIFY
WalletWasabi/BitcoinCore/Rpc/RpcClientBase.cs
WalletWasabi/BitcoinCore/Rpc/RpcClientBase.cs
@@ -178,6 +178,11 @@ namespace WalletWasabi.BitcoinCore.Rpc
return Rpc.TryEstimateSmartFeeAsync(confirmationTarget, estimateMode: estimateMode);
}
+ public Task<RPCClient> CreateWalletAsync(string walletNameOrPath, CreateWalletOptions? options = null)
+ {
+ return Rpc.CreateWalletAsync(walletNameOrPath, options);
+ }
+
#endregion For Testing Only
}
}

Add createwallet as Core has broke backwards compatibilty by not creating and loading wallets by default