Fix node connection logic.
MODIFY
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
WalletWasabi/Blockchain/TransactionBroadcasting/TransactionBroadcaster.cs
@@ -141,7 +141,7 @@ namespace WalletWasabi.Blockchain.TransactionBroadcasting
}
Node node = Nodes.ConnectedNodes.RandomElement();
- while (node == default(Node) || !node.IsConnected || Nodes.ConnectedNodes.Count < 5)
+ while (node is null || !node.IsConnected || Nodes.ConnectedNodes.Count < 5)
{
// As long as we are connected to at least 4 nodes, we can always try again.
// 3 should be enough, but make it 5 so 2 nodes could disconnect in the meantime.

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -625,7 +625,7 @@ namespace WalletWasabi.Wallets
// Select a random node we are connected to.
Node node = Nodes.ConnectedNodes.RandomElement();
- if (node == default(Node) && !node.IsConnected && Network == Network.RegTest)
+ if (node is null || !node.IsConnected)
{
await Task.Delay(100);
continue;

Fix node connection logic.