Skip to content

help api call against a disablewallet daemon will crash it #145

@BloodyNora

Description

@BloodyNora

Describe the issue

crash upon calling komodo-cli -ac_name=VRSC help against disablewallet=1 daemon

Can you reliably reproduce the issue?

100%

If so, please list the steps to reproduce below:

  1. relaunch daemon with -disablewallet
  2. issue help api call

Expected behaviour

Help message

Actual behaviour + errors

komodod: wallet/rpcwallet.cpp:6738: UniValue getbalance64(const UniValue&, bool): Assertion `pwalletMain` != NULL' failed.

The version of Komodo you were using:

Komodo Daemon version v2.0.15-rc1-f32c9dbd3

Any extra information that might be useful in the debugging process.

help seems to call all api calls and then fail at getbalance64 (which the error above kind of hints to).

[...]
UniValue getbalance64(const UniValue& params, bool fHelp)
{
    if (!EnsureWalletIsAvailable(fHelp))
        return NullUniValue;
    set<CBitcoinAddress> setAddress; vector<COutput> vecOutputs;
[...]

above snippet (if/return) will fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions