-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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
rescanning uses incorrect date for old transactions #6662
Comments
Does this still need fixing? Line 3700 in df91e11
|
It doesn't look like that line of code has changed since it was added in 2012 c3f95ef. It sounds like dooglus had to remove the max with |
I believe this is the issue causing older transactions to have incorrect dates when using the Export function out of the bitcoin-core client (GUI). It would be nice if the export function worked correctly... Many thanks 🙏🙏🙏 |
The logic mentioned here was initially extracted to |
Ok, closing for now. Can be reopened if the fix didn't work. |
I had a few conflicted transactions in my wallet, so I ran:
to delete them. After doing so, all my transactions from before January 2014 had a date of January 2014.
Upon checking the source code, I see this line in
CWallet::AddToWallet()
inwallet/wallet.cpp
:blocktime
is the time I want to see in my transactions,latestNow
is much bigger, and so themin()
returns the time I want, butlatestEntry
is January 2014, and so that's the time that is used for all my old transactions.I'm not entirely clear how the Jan 2014 date is being found, since
-zapwallettxes
is meant to delete all the transactions and rescan to find them again, but it seems thatis finding a transaction from 2014, even after all transactions have been deleted.
I tried replacing the nTimeSmart = max(min()) code with this:
then re-ran with the -zap flag, and now I see the correct dates next to all of my transactions.
The text was updated successfully, but these errors were encountered: