Repository navigation
Conversation
…W#713) When the node rejects the wallet's consensus config (Incompatible peer cfgs / Legacy), the CLI said "Connection Failed - Please check your network", pointing at the network, and wallet-api logged nothing. Map the NodeProtocolIncompatible error (the same mapping the UI client uses) to "The node uses an incompatible protocol version. If the network has been upgraded, please update your wallet to the latest version." in the CLI and in NodeNetwork (used by wallet-api). Other connection failures keep the old message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: when the node rejects the wallet as incompatible (a protocol or consensus mismatch), the CLI and wallet-api say so and tell the user to update, instead of "please check your network" (CLI) or nothing (wallet-api).
Why:
NodeProtocolIncompatiblewas only mapped to a message in the UI client.CliNodeConnection::OnConnectionFailedprinted the genericConnection Failed - Please check your network, and wallet-api'sNodeNetwork::OnConnectionFailedlogged nothing (#713, CLI/API part; the UI part belongs to beam-ui).How to see the bug (master, local only)
Improvement
beam-wallet listenConnection Failed - Please check your network reason: Incompatible peer cfgs: …The node uses an incompatible protocol version. If the network has been upgraded, please update your wallet to the latest version. reason: Incompatible peer cfgs: …wallet-api"Incompatible" rather than "newer": the same error is raised for an older node ("Legacy"). The message repeats on reconnect attempts, like the old one.
Testing: both rows above, with master's and this branch's binaries against a local node with different consensus rules. Fork CI (running): https://github.com/vsnation/beam/actions/runs/37480560296
Fixes #713