mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-22 13:52:55 +02:00
Merge branch 'TheBlueMatt-setaccountfix' into integration
This commit is contained in:
6
rpc.cpp
6
rpc.cpp
@ -381,6 +381,12 @@ Value setaccount(const Array& params, bool fHelp)
|
|||||||
"Sets the account associated with the given address.");
|
"Sets the account associated with the given address.");
|
||||||
|
|
||||||
string strAddress = params[0].get_str();
|
string strAddress = params[0].get_str();
|
||||||
|
uint160 hash160;
|
||||||
|
bool isValid = AddressToHash160(strAddress, hash160);
|
||||||
|
if (!isValid)
|
||||||
|
throw JSONRPCError(-5, "Invalid bitcoin address");
|
||||||
|
|
||||||
|
|
||||||
string strAccount;
|
string strAccount;
|
||||||
if (params.size() > 1)
|
if (params.size() > 1)
|
||||||
strAccount = AccountFromValue(params[1]);
|
strAccount = AccountFromValue(params[1]);
|
||||||
|
Reference in New Issue
Block a user