-
Notifications
You must be signed in to change notification settings - Fork 98
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
ERROR: CTxMemPool::ReadFeeEstimates() on komodod start up #523
Comments
The logic within ReadFeeEstimates seems to be there to protect the code from reading "older" versions. And to the code, a lower number is an older version. Changing nVersionRequired in ReadFeeEstimates disables the "version protection" feature of the function, so I imagine that is not what you were suggesting. Changing nVersionRequired in WriteFeeEstimates would fix this issue for new clients, but would not solve the problem for clients that had the previous version. The error would still appear. In addition, the "version protection" would not work as intended for versions between 70100 and 109900. I do not know the history of those version numbers, so am unsure if that is a real problem or not (I am guessing not). Other possible options:
Update: I have verified that the fee estimate file is written on komodod shutdown, so with option 3, the error will only appear once if komodod shuts down properly. Sample test: https://github.com/KomodoPlatform/komodo/compare/dev...jmjatlanta:jmj_issue_523?expand=1 |
I agree that much better is to provide compatibility with the files written with the 109900 value
assuming the format has never changed in our codebase. So we establish protection for future versions |
My offer is to change version required to read in
And users with existing
should just delete the file and let the app re-create it. |
Even no need to delete the file. The error would show once on the first startup and the file will be overwritten on next write. |
Maybe. But i just don't like "special cases". What if we will add 109900 as an exception, but in future the format of this file will be changed and this exception will cause unforeseen consequences? I always vote for clean logic without "special cases" and "workaround of workarounds". Value of 109900 obviously was a mistake / oversight during version changing, so, i vote for totally get get rid of it, instead of turn it into exception. |
What about changing |
is it okay to fail reading this file once? If yes we may just set nVersionRequired to 70100 on writing and instruct users to ignore the error one time at startup |
KomodoPlatform/komodo#523 After these changes version required to read in fee_estimates.dat will be set to 0x111d4 (70100) by default, instead of wrong (legacy codebase) 109900 value. So, the error ERROR: CTxMemPool::ReadFeeEstimates() on wallet startup, mentioned above wouldn't appear. Delete of existing fee_estimates.dat before upgrade to the new version of wallet with with commit included - also could be recommended.
Maybe let's add a small PR with a fix like this DeckerSU/KomodoOcean@eccb8f7 to close this issue too |
On start komodod prints a error ERROR: CTxMemPool::ReadFeeEstimates() up-version (109900) fee estimate file
this is from this code
nVersionRequired is set to 109900 in WriteFeeEstimates and recently CLIENT_VERSION changed from 3000100 to 70100 so the condition nVersionRequired > CLIENT_VERSION now is true.
Suggestion: change nVersionRequired from 109900 to 70100
The text was updated successfully, but these errors were encountered: