From fdbb537d263497529c8f9deb0bb98371530839c3 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Thu, 27 Sep 2012 13:52:09 -0400 Subject: Add new RPC "lockunspent", to prevent spending of selected outputs and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts. --- src/bitcoinrpc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bitcoinrpc.cpp') diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 8c04f577d..c032c66d7 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() @@ -1213,6 +1215,8 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector 2) ConvertTo(params[2], true); if (strMethod == "gettxout" && n > 1) ConvertTo(params[1]); if (strMethod == "gettxout" && n > 2) ConvertTo(params[2]); + if (strMethod == "lockunspent" && n > 0) ConvertTo(params[0]); + if (strMethod == "lockunspent" && n > 1) ConvertTo(params[1]); return params; } -- cgit v1.2.3