Skip to content

Commit

Permalink
Fix 19660: partial revert
Browse files Browse the repository at this point in the history
The fix for CPubKey is a part of `bitcoin#13557: BIP 174 PSBT Serializations and RPCs` which wasn't backported yet
  • Loading branch information
UdjinM6 committed May 19, 2021
1 parent 85ce71d commit 6f7b52a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pubkey.h
Expand Up @@ -107,6 +107,7 @@ class CPubKey

//! Simple read-only vector-like interface to the pubkey data.
unsigned int size() const { return GetLen(vch[0]); }
const unsigned char* data() const { return vch; }
const unsigned char* begin() const { return vch; }
const unsigned char* end() const { return vch + size(); }
const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Expand Up @@ -4073,7 +4073,7 @@ class DescribeWalletAddressVisitor : public boost::static_visitor<UniValue>
UniValue obj(UniValue::VOBJ);
CPubKey vchPubKey;
if (pwallet && pwallet->GetPubKey(keyID, vchPubKey)) {
obj.pushKV("pubkey", HexStr(std::vector<uint8_t>(vchPubKey.begin(), vchPubKey.end())));
obj.pushKV("pubkey", HexStr(vchPubKey));
obj.pushKV("iscompressed", vchPubKey.IsCompressed());
}
return obj;
Expand Down

0 comments on commit 6f7b52a

Please sign in to comment.