Skip to content
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

[wallet] remove redundant KeyOriginInfo access, already done in CreateSig #14678

Merged
merged 2 commits into from Nov 23, 2018

Conversation

@instagibbs
Copy link
Member

@instagibbs instagibbs commented Nov 7, 2018

This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

@instagibbs instagibbs changed the title remove redundant KeyOriginInfo access, already done in CreateSig [wallet] remove redundant KeyOriginInfo access, already done in CreateSig Nov 7, 2018
@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Nov 7, 2018

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #13932 (Additional utility RPCs for PSBT 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.

@meshcollider
Copy link
Member

@meshcollider meshcollider commented Nov 9, 2018

LGTM 9ae01b9

@@ -64,10 +64,6 @@ static bool GetPubKey(const SigningProvider& provider, SignatureData& sigdata, c
}
// Query the underlying provider
if (provider.GetPubKey(address, pubkey)) {
Copy link
Contributor

@practicalswift practicalswift Nov 9, 2018

Choose a reason for hiding this comment

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

Use return provider.GetPubKey(address, pubkey); instead :-)

Copy link
Member Author

@instagibbs instagibbs Nov 12, 2018

Choose a reason for hiding this comment

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

good one, done.

@instagibbs instagibbs force-pushed the redundant_keypath branch from 9ae01b9 to f7beb95 Nov 12, 2018
@laanwj
Copy link
Member

@laanwj laanwj commented Nov 13, 2018

Is this redundant for all possible code paths that lead to GetPubKey?

@instagibbs
Copy link
Member Author

@instagibbs instagibbs commented Nov 13, 2018

@laanwj It's the only instance of it, yes.

@laanwj
Copy link
Member

@laanwj laanwj commented Nov 13, 2018

so this is SignStep that calls GetPubKey then CreateSig?
I see, utACK f7beb95

@instagibbs
Copy link
Member Author

@instagibbs instagibbs commented Nov 13, 2018

made sigdata const to make the intention of function clearer

@laanwj
Copy link
Member

@laanwj laanwj commented Nov 13, 2018

re-utACK b81a186

@laanwj laanwj merged commit b81a186 into bitcoin:master Nov 23, 2018
2 checks passed
laanwj added a commit that referenced this issue Nov 23, 2018
… done in CreateSig

b81a186 GetPubKey: make sigdata const (Gregory Sanders)
f7beb95 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders)

Pull request description:

  This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

Tree-SHA512: a980b7c774c6d69322945227a2b156489fb1991ebf57fe6f26096d5f8047f246a133debc241b05af67810f604b040079add3ab3d30d9e2928095905a2afe17eb
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Jun 6, 2020
…ady done in CreateSig

Summary:
b81a1860561ccbda3cd6913f54e49fdc91c7718c GetPubKey: make sigdata const (Gregory Sanders)
f7beb95a1f921ed292680fbd2f042b4bac73bf59 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders)

Pull request description:

  This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

---

Backport of Core [[bitcoin/bitcoin#14678 | PR14678]]

Test Plan:
  ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6405
linuxsh2 added a commit to linuxsh2/dash that referenced this issue Jul 29, 2021
…already done in CreateSig

b81a186 GetPubKey: make sigdata const (Gregory Sanders)
f7beb95 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders)

Pull request description:

  This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

Tree-SHA512: a980b7c774c6d69322945227a2b156489fb1991ebf57fe6f26096d5f8047f246a133debc241b05af67810f604b040079add3ab3d30d9e2928095905a2afe17eb
linuxsh2 added a commit to linuxsh2/dash that referenced this issue Jul 30, 2021
…already done in CreateSig

b81a186 GetPubKey: make sigdata const (Gregory Sanders)
f7beb95 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders)

Pull request description:

  This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

Tree-SHA512: a980b7c774c6d69322945227a2b156489fb1991ebf57fe6f26096d5f8047f246a133debc241b05af67810f604b040079add3ab3d30d9e2928095905a2afe17eb
linuxsh2 added a commit to linuxsh2/dash that referenced this issue Aug 3, 2021
…already done in CreateSig

b81a186 GetPubKey: make sigdata const (Gregory Sanders)
f7beb95 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders)

Pull request description:

  This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called.

Tree-SHA512: a980b7c774c6d69322945227a2b156489fb1991ebf57fe6f26096d5f8047f246a133debc241b05af67810f604b040079add3ab3d30d9e2928095905a2afe17eb
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants