Skip to content

Unspents are not served after mining #23

Open
@landabaso

Description

@landabaso

The problem was introduced in PR #13 due to the upgrade to leveldown 6.

When requesting UTXOs, if they are still in the mempool, indexd returns values from memory.

However, after mining, indexd uses the leveldown instance passed from regtest-server and the iterator method, which has changed since leveldown 5. Despite my efforts, I have not been able to fix this issue.

The problematic line that does not return values with leveldown > 4 is here. The likely place for a fix is in the dbwrapper.js file (iterator method).

The same code works fine with leveldown 4, but using leveldown 4 requires node 10 for installation so this really needs to be fixed...

@junderw I recommend you don't update the Docker image with the current regtest-server until this is resolved. Many tests won't be affected if mining was not involved, but there is a chance someone will encounter this issue sooner or later.

I will continue to work on this for a bit more, but I am documenting this issue in case I cannot fix it and someone else encounters it in the future.

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