Skip to content
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

local stagenet node can not connect #3962

Closed
plowsof opened this issue Jul 9, 2022 · 0 comments · Fixed by #3965
Closed

local stagenet node can not connect #3962

plowsof opened this issue Jul 9, 2022 · 0 comments · Fixed by #3965

Comments

@plowsof
Copy link
Contributor

plowsof commented Jul 9, 2022

[in my version of reality] when you start gui and open a stagenet wallet with a ./monerod --stagenet already running, it is unable to connect. however if you select Remote node and input localhost:38081 it connects fine.. clicking on Local again to double check and yes unable to connect.

looking around in the source, i decided to hardcode the default port of testnet and 'default' to 38081

function getDefaultDaemonRpcPort(networkType) {

    function getDefaultDaemonRpcPort(networkType) {
        switch (networkType) {
            case NetworkType.STAGENET:
                console.log("[DEBUG]: STAGENET");
                return 38081;
            case NetworkType.TESTNET:
                console.log("[DEBUG]: TESTNET");
                return 38081;
            default:
                console.log("[DEBUG]: DEFAULT");
                return 38081; //<-- we always end up here for stagenet wallet.. nettype == 2 and persistant settings == 2 
                //perhaps NetworkType.STAGENET is not set correctly?
        }
    }

I was unable to see these console.log messages but through process of elimination , when opening a stagenet wallet the networktype is neither stagenet or testnet, it uses default (18081) so unable to connect.

the correct value should be read from here but apparently not:

readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)

this looked weird how mainnet is set but the others not?

https://github.com/monero-project/monero/blob/424e4de16b98506170db7b0d7d87a79ccf541744/src/wallet/api/wallet2_api.h#L45

now i can review #3734 with a local stagenet node 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant