Merge pull request #3369
6027b46
Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
This commit is contained in:
commit
23981b1f47
@ -276,6 +276,7 @@ static const CRPCCommand vRPCCommands[] =
|
|||||||
{ "walletlock", &walletlock, true, false, true },
|
{ "walletlock", &walletlock, true, false, true },
|
||||||
{ "encryptwallet", &encryptwallet, false, false, true },
|
{ "encryptwallet", &encryptwallet, false, false, true },
|
||||||
{ "getbalance", &getbalance, false, false, true },
|
{ "getbalance", &getbalance, false, false, true },
|
||||||
|
{ "getunconfirmedbalance", &getunconfirmedbalance, false, false, true },
|
||||||
{ "move", &movecmd, false, false, true },
|
{ "move", &movecmd, false, false, true },
|
||||||
{ "sendfrom", &sendfrom, false, false, true },
|
{ "sendfrom", &sendfrom, false, false, true },
|
||||||
{ "sendmany", &sendmany, false, false, true },
|
{ "sendmany", &sendmany, false, false, true },
|
||||||
|
@ -135,6 +135,7 @@ extern json_spirit::Value verifymessage(const json_spirit::Array& params, bool f
|
|||||||
extern json_spirit::Value getreceivedbyaddress(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value getreceivedbyaddress(const json_spirit::Array& params, bool fHelp);
|
||||||
extern json_spirit::Value getreceivedbyaccount(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value getreceivedbyaccount(const json_spirit::Array& params, bool fHelp);
|
||||||
extern json_spirit::Value getbalance(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value getbalance(const json_spirit::Array& params, bool fHelp);
|
||||||
|
extern json_spirit::Value getunconfirmedbalance(const json_spirit::Array& params, bool fHelp);
|
||||||
extern json_spirit::Value movecmd(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value movecmd(const json_spirit::Array& params, bool fHelp);
|
||||||
extern json_spirit::Value sendfrom(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value sendfrom(const json_spirit::Array& params, bool fHelp);
|
||||||
extern json_spirit::Value sendmany(const json_spirit::Array& params, bool fHelp);
|
extern json_spirit::Value sendmany(const json_spirit::Array& params, bool fHelp);
|
||||||
|
@ -646,6 +646,15 @@ Value getbalance(const Array& params, bool fHelp)
|
|||||||
return ValueFromAmount(nBalance);
|
return ValueFromAmount(nBalance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Value getunconfirmedbalance(const Array ¶ms, bool fHelp)
|
||||||
|
{
|
||||||
|
if (fHelp || params.size() > 0)
|
||||||
|
throw runtime_error(
|
||||||
|
"getunconfirmedbalance\n"
|
||||||
|
"Returns the server's total unconfirmed balance\n");
|
||||||
|
return ValueFromAmount(pwalletMain->GetUnconfirmedBalance());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Value movecmd(const Array& params, bool fHelp)
|
Value movecmd(const Array& params, bool fHelp)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user