mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge pull request #1861 from jgarzik/coinlock
Add new RPC "lockunspent", to prevent spending of selected outputs
This commit is contained in:
commit
78504bb04f
5 changed files with 125 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue