Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Feb 15, 2016

Check for EOF before every getline, and warn when reading gets to EOF before the end of the data.

Also check when number of keys does not match number of values.

Stricter error checking could shed more light on issues such as #7463 and #7379.

@laanwj laanwj added the Wallet label Feb 15, 2016
Check for EOF before every getline, and warn when reading gets to EOF
before the end of the data.

Stricter error checking could shed more light on issues such as bitcoin#7463
and bitcoin#7379.
@laanwj laanwj force-pushed the 2016_02_salvage_unexpected_eof branch from 8569580 to ca8fb59 Compare February 15, 2016 15:35
@jonasschnelli
Copy link
Contributor

utACK

@maflcko
Copy link
Member

maflcko commented Feb 27, 2016

utACK ca8fb59

Edit: I got this once now:

2016-02-27 18:15:43 Renamed wallet.dat to wallet.1456596943.bak
2016-02-27 18:15:43 CDBEnv::Salvage: Database salvage found errors, all data may not be recoverable.
2016-02-27 18:15:43 CDBEnv::Salvage: WARNING: Number of keys in data does not match number of values.
2016-02-27 18:15:43 CDBEnv::Salvage: WARNING: Unexpected end of file while reading salvage output.
2016-02-27 18:15:43 Salvage(aggressive) found 300 records

@laanwj laanwj merged commit ca8fb59 into bitcoin:master Feb 29, 2016
laanwj added a commit that referenced this pull request Feb 29, 2016
ca8fb59 wallet: Warn on unexpected EOF while salvaging wallet (Wladimir J. van der Laan)
codablock pushed a commit to codablock/dash that referenced this pull request Dec 11, 2017
…llet

ca8fb59 wallet: Warn on unexpected EOF while salvaging wallet (Wladimir J. van der Laan)
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Nov 15, 2020
…refactor.

58504c2 [Wallet] refactor CWallet/CWalletDB/CDB (Round 2) (furszy)
c16390d [Wallet] refactor CWallet/CWalletDB/CDB (Round 1) (furszy)
99adac0 C++11: s/boost::scoped_ptr/std::unique_ptr/ (furszy)
815773e use constant references for strings in functions in wallet/*.* (furszy)
24f1041 Do not shadow variables. (Pavel Janík)
6a0c59a wallet: Warn on unexpected EOF while salvaging wallet (Wladimir J. van der Laan)
12bc297 dbwrapper: Use new .data() method of CDataStream (Wladimir J. van der Laan)
b0f0d91 streams: Remove special cases for ancient MSVC (Wladimir J. van der Laan)
ba96777 streams: Add data() method to CDataStream (Wladimir J. van der Laan)
6ec0722 wallet: Use CDataStream.data() (Wladimir J. van der Laan)
ca1a3b0 [Wallet] remove unused code/conditions in ReadAtCursor (Jonas Schnelli)
fd259f3 remove unused classes from db.h (Philip Kaufmann)

Pull request description:

  Upgrading the wallet, wallet db and db wrapper areas with several back ports and updates adaptations.

  List of PRs:
  * dashpay#5933
  * bitcoin#7537
  * bitcoin#8191
  * bitcoin#8564
  * bitcoin#8574
  * bitcoin#8629
  * bitcoin#9353

  Note:
  Low priority PR, can be reviewing after merge Sapling and tier two PRs.
  I made it because we are pretty far from upstream in the db area and want to introduce some new functionality in the future that requires a more up-to-date db layer.

ACKs for top commit:
  random-zebra:
    ACK 58504c2 and merging...

Tree-SHA512: e5a700e855bcec20f0b74e41825ddc3a36b56a0cbe83212c93d212c06765254464999567b395584dfeb9d4b12999bc835d2e89949684d64b1503db36c53fd3c8
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants