Skip to content

Small bug in db.cpp #424

@xanatos

Description

@xanatos

Line 531 of db.cpp:
CAddress addr(psz, NODE_NETWORK);

BUT the relevant constructors of CAddress (those starting with a char*) are:

explicit CAddress(const char* pszIn, int portIn, bool fNameLookup = false, uint64 nServicesIn=NODE_NETWORK)
explicit CAddress(const char* pszIn, bool fNameLookup = false, uint64 nServicesIn=NODE_NETWORK)

so the first constructor is called and portIn = NODE_NETWORK. Probably there isn't any difference (the port isn't really necessary, all that is done in db.cpp is checking if the address is valid), but the code should be:

CAddress addr(psz, false, NODE_NETWORK);

or more simply

CAddress addr(psz);

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