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

Unspents are not served after mining #23

Open
landabaso opened this issue May 30, 2024 · 1 comment
Open

Unspents are not served after mining #23

landabaso opened this issue May 30, 2024 · 1 comment

Comments

@landabaso
Copy link
Contributor

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.

@junderw
Copy link
Member

junderw commented May 30, 2024

Thank you!

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

No branches or pull requests

2 participants