-
Notifications
You must be signed in to change notification settings - Fork 912
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
db: txindex known without blockheight #3265
Comments
It may very well be that current code does not reproduce this, as the code that lead to it has already been fixed, but the databases with corruptions are still out in the wild... |
I see, the assertion might be a bit overzealous. The |
I also thought about reorgs on code that didnt handle DB update correctly. But I doubt this was the reason since I have 4 such TX on two nodes. Too many to be a coincidence. In any case, the txindex should be erased from the DB if the blockheight is unknown for whatever reason. If we check this we could keep the assert... It would also be good to know what causes this... |
We'll likely not unset the |
Issue and Steps to Reproduce
An data consistency assert added by commit ed23875 (merged yesterday into master) causes problems on my testnet and mainnet nodes. The added assert checks that if a transaction index is known a blockheight must also be known or wise versa.
If your node is affected it can be reproduced by:
If the above command asserts, its very likely your node has corrupt data in
sqlite
db.SQL query to verify
Notes
This cannot be 'fixed' by using
dev-rescan-outputs
. We could add adev-rescan-transactions
or add functionality todev-rescan-outputs
and call it on startup if we detect this inconsistency in the database.The text was updated successfully, but these errors were encountered: