Skip to content

Something goes wrong when saving claimtrie nodes to disk and loading it  #133

@kaykurokawa

Description

@kaykurokawa

Discovered in #110

When loading in claimtrie nodes using function InsertFromDisk() https://github.com/lbryio/lbrycrd/blob/master/src/claimtrie.cpp#L1072 , we discovered that for some reason the "name" variable contains an extra bogus character at the end.

However, I suspect that there is not always a bogus character attached to the "name" variable, thus this function will completely fail.

I've tested the serialization classes to see if there is any problem loading/saving string classes and there is no problem, so its likely a problem originating from when we save nodes, particularly when the function markNodeDirty() gets called https://github.com/lbryio/lbrycrd/blob/master/src/claimtrie.cpp#L828 which marks nodes to be saved on disk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: reproIssue needs step-by-step instructions on how to reproduce in latest codetype: bugExisting functionality is wrong or broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions