Enable pubkey lookup for p2sh-p2wpkh in validateaddress #8992

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@instagibbs
Contributor

When we ever switch to p2sh-p2pkh this will be useful for general wallet usage, as well as adapting tests where retrieving the pubkeys for standard addresses is important.

src/rpc/misc.cpp
+ CPubKey vchPubKey;
+ if (pwalletMain->GetPubKey(CKeyID(uint160(witnessprogram)), vchPubKey)) {
+ obj.push_back(Pair("pubkey", HexStr(vchPubKey)));
+ obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed()));
@jl2012
jl2012 Oct 21, 2016 Member

Signing and watching with segwit uncompressed keys are already disabled. I think the results should be suppressed if the key is not compressed.

@instagibbs
Contributor

@jl2012 suppressed uncompressed pubkeys and removed the iscompressed field

@luke-jr luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 21, 2016
@instagibbs @luke-jr instagibbs + luke-jr Enable pubkey lookup for p2sh-p2wpkh in validateaddress
Github-Pull: #8992
Rebased-From: 3d2db70
4762f19
@luke-jr luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 21, 2016
@instagibbs @luke-jr instagibbs + luke-jr supress uncompressed segwit pubkeys
Github-Pull: #8992
Rebased-From: 981af93
f2eb1cf
@instagibbs
Contributor

Closing in favor of #9017

@instagibbs instagibbs closed this Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment