mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
More work on the wallet/key scheme.
Call the public generator a public generator rather than a public key. Ignore private sub-keys greater than the EC group Bugfixes. When we create a new key family, validate the first 500 keys, just out of paranoia.
This commit is contained in:
@@ -161,7 +161,7 @@ Json::Value RPCServer::doCreateFamily(Json::Value& params)
|
||||
|
||||
ret["FamilyIdentifier"]=family.GetHex();
|
||||
ret["ShortName"]=theApp->getWallet().getShortName(family);
|
||||
ret["PublicGenerator"]=theApp->getWallet().getPubKeyHex(family);
|
||||
ret["PublicGenerator"]=theApp->getWallet().getPubGenHex(family);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -243,16 +243,16 @@ Json::Value RPCServer::doInfo(Json::Value ¶ms)
|
||||
family=theApp->getWallet().findFamilySN(fParam);
|
||||
if(!family) return JSONRPCError(500, "No such family");
|
||||
|
||||
std::string name, comment, pubKey;
|
||||
std::string name, comment, pubGen;
|
||||
bool isLocked;
|
||||
if(!theApp->getWallet().getFullFamilyInfo(family, name, comment, pubKey, isLocked))
|
||||
if(!theApp->getWallet().getFullFamilyInfo(family, name, comment, pubGen, isLocked))
|
||||
return JSONRPCError(500, "Family not found");
|
||||
Json::Value obj(Json::objectValue);
|
||||
obj["FamilyIdentifier"]=family.GetHex();
|
||||
obj["ShortName"]=name;
|
||||
if(!comment.empty())
|
||||
obj["Comment"]=comment;
|
||||
obj["PublicGenerator"]=pubKey;
|
||||
obj["PublicGenerator"]=pubGen;
|
||||
obj["Locked"]=isLocked ? "true" : "false";
|
||||
|
||||
if(paramCount==2)
|
||||
|
||||
Reference in New Issue
Block a user