Skip to content

[walletdb] Fix syntax error in key parser#7381

Merged
laanwj merged 1 commit into
bitcoin:masterfrom
maflcko:Mf1601-walletdbKeyparserFix
Jan 20, 2016
Merged

[walletdb] Fix syntax error in key parser#7381
laanwj merged 1 commit into
bitcoin:masterfrom
maflcko:Mf1601-walletdbKeyparserFix

Conversation

@maflcko

@maflcko maflcko commented Jan 20, 2016

Copy link
Copy Markdown
Member

This needs backport to all versions of bitcoin/altcoins after merge.

A dump may look like:

VERSION=3
format=bytevalue
database=main
type=btree
db_pagesize=4096
HEADER=END
<{Data}>
DATA=END

So the current parser gives us odd data like:

keyHex="DATA=END";
valueHex="";

(sometimes the other way round)

Comment thread src/wallet/db.cpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this value come from? If from berkeleydb itself: Is it documented, or available as some kind of constant?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably make it a constant for our sakes anyway.

@laanwj

laanwj commented Jan 20, 2016

Copy link
Copy Markdown
Member

Fixes #7379 I suppose?

@laanwj

laanwj commented Jan 20, 2016

Copy link
Copy Markdown
Member

utACK

@laanwj laanwj added this to the 0.12.0 milestone Jan 20, 2016
@laanwj
laanwj merged commit fa6d4cc into bitcoin:master Jan 20, 2016
laanwj added a commit that referenced this pull request Jan 20, 2016
fa6d4cc [walletdb] Fix syntax error in key parser (MarcoFalke)
laanwj pushed a commit that referenced this pull request Jan 20, 2016
@maflcko
maflcko deleted the Mf1601-walletdbKeyparserFix branch January 20, 2016 12:09
laanwj pushed a commit that referenced this pull request Jan 20, 2016
laanwj pushed a commit that referenced this pull request Jan 20, 2016
@maflcko

maflcko commented Jan 20, 2016

Copy link
Copy Markdown
Member Author

Fixes #7379 I suppose?

There are other issues with salvagewallet, so I can't guarantee that.

@laanwj

laanwj commented Jan 20, 2016

Copy link
Copy Markdown
Member

@laanwj

laanwj commented Jan 20, 2016

Copy link
Copy Markdown
Member

There are other issues with salvagewallet, so I can't guarantee that.

Right, I meant the specific problem. It's never possible to guarantee that you've solved all bugs. If only...

@jonasschnelli

Copy link
Copy Markdown
Contributor

Nice catch!
Thanks for fixing.
Post merge ACK.

@maflcko maflcko mentioned this pull request Jan 21, 2016
dexX7 pushed a commit to dexX7/bitcoin that referenced this pull request Apr 24, 2016
reddink pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request May 27, 2020
Github-Pull: bitcoin#7381
Rebased-From: fa6d4cc
(cherry picked from commit b0c97ce)
@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants