diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-20 14:42:52 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-20 14:43:01 +0100 |
commit | 23981b1f47a6b1ace419934a07282c5a15441f94 (patch) | |
tree | 82c53bae3b6ca8600af531ebc94f755d8693da8a /src/rpcwallet.cpp | |
parent | 326b5bb9d0e371e7636d1484b9b006e766fd4af0 (diff) | |
parent | 6027b460e40e7769930d0e89f18f011fa0f6c262 (diff) |
Merge pull request #3369
6027b46 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r-- | src/rpcwallet.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 32db0b46aa..8ad5c9c51d 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -646,6 +646,15 @@ Value getbalance(const Array& params, bool fHelp) 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) { |