SISAR
|
|
March 06, 2016, 01:31:37 PM |
|
Behaviour might be different based on OS, I am using Win7 64-bit with Bitcoin Core v0.12 64-bit.
The code I quoted is the same code regardless of OS (there isn't separate source code for the different OS versions). Right, but there are differences at OS level when it comes to handling of files. In any case, there are no traces of .bak file on my computer.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 01:32:31 PM |
|
If you want to pay me to "spend my time doing things" then you'll need to pay me up front.
You have been told to restore your old wallet and yet you don't do that and then seem to insist that others should waste their time repeating things in order to try and "point out a bug" (if I had just thought I'd lost over 200 BTC I wouldn't give a fuck about whether or not there is a bug).
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 01:34:12 PM |
|
Right, but there are differences at OS level when it comes to handling of files. In any case, there are no traces of .bak file on my computer.
If there are no traces of the "wallet.XXX.bak" file after being renamed to "wallet.dat" (assuming you deleted the empty "wallet.dat" first) then it is because Bitcoin Core didn't find a problem with it when it restarted (i.e. the file wasn't corrupt). The code is not ambiguous nor is it going to behave differently on Windows or Linux in regards to this.
|
|
|
|
SISAR
|
|
March 06, 2016, 01:37:25 PM |
|
Right, but there are differences at OS level when it comes to handling of files. In any case, there are no traces of .bak file on my computer.
If there are no traces of the "wallet.XXX.bak" file after being renamed to "wallet.dat" (assuming you deleted the empty "wallet.dat" first) then it is because Bitcoin Core didn't find a problem with it when it restarted (i.e. the file wasn't corrupt). There is no wallet.dat file at the stage when you are renaming .bak file to .dat file.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 01:38:46 PM |
|
There is no wallet.dat file at the stage when you are renaming .bak file to .dat file.
Okay - so basically Bitcoin didn't actually start up properly then (or it started up without a wallet). In either case it isn't magically deleting anything if you renamed the .bak file yourself. Are you sure your .bak file is a corrupt wallet?
|
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 01:50:27 PM |
|
Bitcoin Core itself is not doing what you suggest but it is possible that BerkleyDB is doing something strange in this situation (the __db files are below the level of what is coded in Bitcoin Core so if there is some issue with that then it is an issue with BerkleyDB). Remember it was *you* (or *him*) that got rid of the file "wallet.XXX.bak" (by renaming it) not Bitcoin Core. What should have been done was to create a copy of this file (rather than rename it) in the very first place. Also why on earth someone would be silly enough to rename such an important file as "wallet.dat" when Bitcoin Core is running is beyond me (it's as though the OP was trying to destroy his wallet on purpose which is hardly the approach that anyone who valued 200+ BTC would take).
|
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 02:07:16 PM |
|
Okay but I think you are going to cop it when they read this step: 6. Rename wallet.(random numbers).bak back to wallet.dat and start Bitcoin Core again.
(quite clearly it was *you* that got rid of the "wallet.XXX.bak" file by renaming it - not Bitcoin Core) Perhaps you should clarify that the issue you are raising is why did the supposedly corrupt "wallet.dat" suddenly seem to not be identified as corrupt (but was replaced with a new one) as this is more to the crux of the issue.
|
|
|
|
SISAR
|
|
March 06, 2016, 02:09:48 PM |
|
Okay but I think you are going to cop it when they read this step: 6. Rename wallet.(random numbers).bak back to wallet.dat and start Bitcoin Core again.
(quite clearly it was *you* that got rid of the "wallet.XXX.bak" file not Bitcoin Core by renaming it) True but in any case Bitcoin Core should keep a copy of corrupt wallet.dat file.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 02:11:20 PM |
|
True but in any case Bitcoin Core should keep a copy of corrupt wallet.dat file.
It did (i.e. it created the "wallet.XXX.bak" file for just this reason) but then you went and renamed it (it can only do so much to predict what silliness a user might get up to). Typically when something breaks you should stop and ask for help then (not try and fix it yourself if you've got no idea what you are actually doing).
|
|
|
|
SISAR
|
|
March 06, 2016, 02:15:57 PM |
|
Still it is unclear why and unexpected that Bitcoin Core deleted corrupt wallet.dat file. It should create a copy of it no matter what or not mess with wallet file at all if it is unreadable or whatever.
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 02:19:04 PM |
|
Still it is unclear why and unexpected that Bitcoin Core deleted corrupt wallet.dat file. It should create a copy of it no matter what or not mess with wallet file at all if it is unreadable or whatever.
The Bitcoin Core code clearly does this - but if BerkleyDB decides to open the file (after your rename) and then not report an error then Bitcoin Core is left unable to do anything (it is relying upon the 3rd party software). The mistake was renaming rather than copying (and that was a "user error").
|
|
|
|
SISAR
|
|
March 06, 2016, 02:24:02 PM |
|
Because original corrupted wallet.dat file was renamed to wallet.(timestamp).bak file which is then renamed back to wallet.dat file which is subsequently deleted it shows that wallet.(timestamp).bak file is not the same as original corrupted wallet.dat file or Bitcoin Core handles .dat and .bak files differently, deleting the later (after it was renamed) for no obvious reason. Put differently, original corrupted wallet.dat and wallet.dat file created by renaming wallet.(timestamp).bak files were not treated equally for some reason. Why simply not rename to .bak and exit, as previously?
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
March 06, 2016, 02:27:12 PM |
|
I think the key point was renaming stuff "while Bitcoin Core was running" (and that is where the bullet entered the foot).
Clearly the final state of the DB became problematic due to what had happened - but as an end-user you should never rename things like "wallet.dat" only make copies (that is just plain commonsense).
My guess is that some other state file (at the DB level) could be the reason for this problem but it isn't a Bitcoin Core problem really.
I have batch files (for Windows versions of Bitcoin) to work with different wallets - I never "rename" files though (they always use copies and overwrite "wallet.dat" before Bitcoin Core is started or copy "wallet.dat" after Bitcoin Core has shutdown).
|
|
|
|
SISAR
|
|
March 06, 2016, 02:53:10 PM |
|
What exactly happens is, in this case, secondary to the fact that file is gone. So I have nothing more to add to this thread but again point back to procedure for file recovery at the first page.
|
|
|
|
totohasproblem (OP)
Newbie
Offline
Activity: 14
Merit: 0
|
|
March 06, 2016, 07:53:53 PM |
|
There is no wallet.dat file at the stage when you are renaming .bak file to .dat file.
Are you sure your .bak file is a corrupt wallet? i don´t have the bak file at all. i renamed it and then it was deleted or moved by the programm
|
|
|
|
|
Bitraker
|
|
March 06, 2016, 10:25:37 PM |
|
Hi you need to do search on your computer for the wallet.dat or bak file it could be in your temporary or junk folder. Try finding or download a program called undelete and download on your Mac and see if it finds it. Check to see if you sent wallet to dbox. If this helps please send me $2000 or btc amount to 1N6d2118Ki4bNxKjF5MbECGDLSE5SPSuLo I really need it.
|
|
|
|
thewall
Newbie
Offline
Activity: 25
Merit: 0
|
|
March 06, 2016, 10:30:50 PM |
|
I can help, but I'd need to be on your machine to do it. If all else fails, let me know.
|
|
|
|
|