New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't try to connect to a non-existing full node #11184
Comments
Wasabi connects to the local full node by default. That's a feature, not a bug. However, the warnings should not be happening. |
Yes, the warning message should be DEBUG level - but only in case of the intention was not to use full node otherwise it should be a warning. |
Can anyone repro this? I didn't see this issue happening on my side for a long time. |
Haven't been able to reproduce since. |
Can you still repro this Rafe? |
@molnard yes, I saw this again few days ago while running master. |
can repro, 2.0.6 RC1 02a6ee2
|
This should not be debug level, and it should not be hidden either. It's definitely a problem. So the problem is to log several times in a row I suppose. What we can do is to add a bool so we only log once, that way: diff --git a/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs b/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
index 7ebaa1c78..85f99f844 100644
--- a/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
+++ b/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
@@ -86,6 +86,8 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
CancellationToken shutdownToken = LoopCts.Token;
TimeSpan reconnectDelay = MinReconnectDelay;
+ var shouldLogHandShakeWarning = true;
+
while (!shutdownToken.IsCancellationRequested)
{
using CancellationTokenSource connectCts = new(TimeSpan.FromSeconds(10));
@@ -97,6 +99,8 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
{
using ConnectedNode connectedNode = await ConnectAsync(linkedCts.Token).ConfigureAwait(false);
+ shouldLogHandShakeWarning = true;
+
// Reset reconnect delay as we actually connected the local node.
reconnectDelay = MinReconnectDelay;
_specificBitcoinCoreNode = connectedNode;
@@ -117,7 +121,11 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
Use "whitebind" in the node configuration. Typically whitebind=127.0.0.1:8333 if Wasabi and the node are on the same machine and whitelist=1.2.3.4 if they are not.
""";
- Logger.LogWarning(message);
+ if (shouldLogHandShakeWarning)
+ {
+ Logger.LogWarning(message);
+ shouldLogHandShakeWarning = false;
+ }
}
if (!shutdownToken.IsCancellationRequested) |
General Description
My logs are sometimes full of lines about trying to connect to a node, even though I don't have one in my local network, and I haven't touched the settings. Not sure if it's a problem, but it looked weird.
How To Reproduce?
I don't know.
Screenshots
Operating System
Win10
Logs
See Screenshots
Wasabi Version
Master 4486632
The text was updated successfully, but these errors were encountered: