Handshake on block download if not already done
MODIFY
WalletWasabi/Extensions/NBitcoinExtensions.cs
WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -18,6 +18,8 @@ namespace NBitcoin
{
public static async Task<Block> DownloadBlockAsync(this Node node, uint256 hash, CancellationToken cancellationToken)
{
+ if (node.State == NodeState.Connected)
+ node.VersionHandshake(cancellationToken);
using (var listener = node.CreateListener())
{
var getdata = new GetDataPayload(new InventoryVector(node.AddSupportedOptions(InventoryType.MSG_BLOCK), hash));

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -806,7 +806,7 @@ namespace WalletWasabi.Services
Block blockFromLocalNode = null;
// Should timeout faster. Not sure if it should ever fail though. Maybe let's keep like this later for remote node connection.
- using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(RuntimeParams.Instance.NetworkNodeTimeout)))
+ using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(64)))
{
blockFromLocalNode = await LocalBitcoinCoreNode.DownloadBlockAsync(hash, cts.Token);
}

Handshake on block download if not already done