diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-12-12 09:15:43 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-12-12 09:15:43 -0800 |
commit | 78504bb04ffe77ac156aaa5f863424deaaa3ca0f (patch) | |
tree | 2c0349f4b97a5254e375743989f827b20a9a69bc /src/bitcoinrpc.cpp | |
parent | 043a8fb98df03c458bb0b4c119418fd23b59f2bc (diff) | |
parent | fdbb537d263497529c8f9deb0bb98371530839c3 (diff) |
Merge pull request #1861 from jgarzik/coinlock
Add new RPC "lockunspent", to prevent spending of selected outputs
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r-- | src/bitcoinrpc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 481ceb9f40..bfb696da3d 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -254,6 +254,8 @@ static const CRPCCommand vRPCCommands[] = { "sendrawtransaction", &sendrawtransaction, false, false }, { "gettxoutsetinfo", &gettxoutsetinfo, true, false }, { "gettxout", &gettxout, true, false }, + { "lockunspent", &lockunspent, false, false }, + { "listlockunspent", &listlockunspent, false, false }, }; CRPCTable::CRPCTable() @@ -1215,6 +1217,8 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri if (strMethod == "signrawtransaction" && n > 2) ConvertTo<Array>(params[2], true); if (strMethod == "gettxout" && n > 1) ConvertTo<boost::int64_t>(params[1]); if (strMethod == "gettxout" && n > 2) ConvertTo<bool>(params[2]); + if (strMethod == "lockunspent" && n > 0) ConvertTo<bool>(params[0]); + if (strMethod == "lockunspent" && n > 1) ConvertTo<Array>(params[1]); return params; } |