diff options
| author | tcatm <[email protected]> | 2011-03-05 17:24:34 +0100 |
|---|---|---|
| committer | tcatm <[email protected]> | 2011-03-05 17:24:34 +0100 |
| commit | 8e5aaada2e93e3a2f64135ece5ee09ad3d11cfe3 (patch) | |
| tree | e0bf81411e4b05210a95811d00ca8aa5939657a9 /rpc.cpp | |
| parent | Merge branch 'rounding' of https://github.com/gavinandresen/bitcoin-git into ... (diff) | |
| parent | throw JSONRPCError(-5, "Invalid bitcoin address") instead. (diff) | |
| download | discoin-8e5aaada2e93e3a2f64135ece5ee09ad3d11cfe3.tar.xz discoin-8e5aaada2e93e3a2f64135ece5ee09ad3d11cfe3.zip | |
Merge branch 'setaccountfix' of https://github.com/TheBlueMatt/bitcoin into TheBlueMatt-setaccountfix
Diffstat (limited to 'rpc.cpp')
| -rw-r--r-- | rpc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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]); |