Skip to content

wallet: Drop unused OldKey - #16502

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
promag:2019-07-drop-oldkey
Aug 1, 2019
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
promag:2019-07-drop-oldkey

Conversation

@promag

@promag promag commented Jul 30, 2019

Copy link
Copy Markdown
Contributor

Replaces #16494, OldKey (previously CWalletKey) was never serialized in the code history which means that unserialization support is not required, so remove the code entirely.

@achow101

Copy link
Copy Markdown
Member

ACK c1c0819a3d9fb6815dcda2a5f1680d704188dcb8

Reviewed code. Looked through the git history and I could not find anywhere where wkey was written to the wallet, only where it was read. Thus I believe that it is safe to remove this and won't break compatibility with any wallets created using released versions.

@DrahtBot

DrahtBot commented Jul 30, 2019 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16341 (Introduce ScriptPubKeyMan interface and use it for key and script management (aka wallet boxes) by achow101)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@jnewbery

Copy link
Copy Markdown
Contributor

Concept ACK

@laanwj

laanwj commented Jul 31, 2019 •

Copy link
Copy Markdown
Member

I'm confused. So this "wkey" code has existed all the way from the beginning and was never used? That's a very interesting observation.

One though though: please fail loading when you encounter one instead of ignoring it. So if someone (it's very unlikely, but still) happens to load a wallet with one of these old keys in it, this makes sure they get a compatibility error, instead of the keys silently disappearing.

@practicalswift

Copy link
Copy Markdown
Contributor

Very nice find!

Concept ACK assuming fail on encountering old key

@jonasschnelli

Copy link
Copy Markdown
Contributor

Looks good and agree with @laanwj about that it should fail in case a wkey is found.

@practicalswift

Copy link
Copy Markdown
Contributor

utACK df577f7ed0ab06c756110060e01b5be73582f115 modulo squash

@promag promag left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll just wait for more feedback before squashing.

Comment thread src/wallet/walletdb.cpp Resolved
Comment thread src/wallet/walletdb.cpp Resolved

@jnewbery jnewbery left a comment

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.

utACK df577f7ed0ab06c756110060e01b5be73582f115

Suggested changes inline.

Comment thread src/wallet/walletdb.cpp Resolved
@promag
promag force-pushed the 2019-07-drop-oldkey branch from df577f7 to 0b1f4b3 Compare July 31, 2019 17:36
@promag

promag commented Jul 31, 2019

Copy link
Copy Markdown
Contributor Author

Squashed.

@laanwj laanwj left a comment

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.

ACK 0b1f4b3

@jnewbery

Copy link
Copy Markdown
Contributor

ACK 0b1f4b3

@fanquake fanquake left a comment

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.

ACK 0b1f4b3

Comment thread src/wallet/walletdb.cpp Resolved
@fanquake
fanquake merged commit 0b1f4b3 into bitcoin:master Aug 1, 2019
fanquake added a commit that referenced this pull request Aug 1, 2019
0b1f4b3 wallet: Drop unused OldKey (João Barbosa)

Pull request description:

  Replaces #16494, `OldKey` (previously `CWalletKey`) was never serialized in the code history which means that unserialization support is not required, so remove the code entirely.

ACKs for top commit:
  jnewbery:
    ACK 0b1f4b3
  laanwj:
    ACK 0b1f4b3
  fanquake:
    ACK 0b1f4b3

Tree-SHA512: 92e9b2d6fc41f2765492d5d69d18fc4302c40ab44f28c8c30ca652c72767fbc484848c51a38ecf1f447849767a583c398784408bb5f64f9c86f9a5872b325ffc
kwvg added a commit to kwvg/dash that referenced this pull request Dec 12, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 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.

8 participants