X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Frpcwallet.cpp;fp=src%2Frpcwallet.cpp;h=12b6603051542719ea947c3ab9150a4c584a8f1a;hb=90d203d2e37a06a368a5ebc3af03c1d3af7ec04e;hp=872471c127ce53cb8b610aade35360a7cdac177c;hpb=b7240acf4b90bdd502b73705b1904d5ad905704d;p=novacoin.git diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 872471c..12b6603 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1905,8 +1905,13 @@ Value newmalleablekey(const Array& params, bool fHelp) if (!pwalletMain->GetMalleableKey(keyView, mKey)) throw runtime_error("Unable to generate new malleable key"); + CMalleablePubKey mPubKey = mKey.GetMalleablePubKey(); + CDataStream ssPublicBytes(SER_NETWORK, PROTOCOL_VERSION); + ssPublicBytes << mPubKey; + Object result; - result.push_back(Pair("PublicPair", mKey.GetMalleablePubKey().ToString())); + result.push_back(Pair("PublicPair", mPubKey.ToString())); + result.push_back(Pair("PublicBytes", HexStr(ssPublicBytes.begin(), ssPublicBytes.end()))); result.push_back(Pair("KeyView", keyView.ToString())); return result; @@ -1976,7 +1981,7 @@ Value adjustmalleablepubkey(const Array& params, bool fHelp) string pubKeyPair = params[0].get_str(); CMalleablePubKey malleablePubKey; - if (pubKeyPair.size() == 138) { + if (pubKeyPair.size() == 136) { CDataStream ssPublicBytes(ParseHex(pubKeyPair), SER_NETWORK, PROTOCOL_VERSION); ssPublicBytes >> malleablePubKey; } else