aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authortcatm <[email protected]>2011-03-05 17:26:14 +0100
committertcatm <[email protected]>2011-03-05 17:26:14 +0100
commitb104df742d1acfcccb35e35c5427ef221296db73 (patch)
treee0bf81411e4b05210a95811d00ca8aa5939657a9 /rpc.cpp
parentMake send/receive limits bigger (10MB each) (diff)
parentMerge branch 'setaccountfix' of https://github.com/TheBlueMatt/bitcoin into T... (diff)
downloaddiscoin-b104df742d1acfcccb35e35c5427ef221296db73.tar.xz
discoin-b104df742d1acfcccb35e35c5427ef221296db73.zip
Merge branch 'TheBlueMatt-setaccountfix' into integration
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc.cpp b/rpc.cpp
index 1c6f228e5..dd94acc05 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -381,6 +381,12 @@ Value setaccount(const Array& params, bool fHelp)
"Sets the account associated with the given address.");
string strAddress = params[0].get_str();
+ uint160 hash160;
+ bool isValid = AddressToHash160(strAddress, hash160);
+ if (!isValid)
+ throw JSONRPCError(-5, "Invalid bitcoin address");
+
+
string strAccount;
if (params.size() > 1)
strAccount = AccountFromValue(params[1]);