diff options
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r-- | src/rpcwallet.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 560be0570a..190c6b86b5 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -623,10 +623,10 @@ Value getbalance(const Array& params, bool fHelp) int nMinDepth = 1; if (params.size() > 1) nMinDepth = params[1].get_int(); - isminefilter filter = MINE_SPENDABLE; + isminefilter filter = ISMINE_SPENDABLE; if(params.size() > 2) if(params[2].get_bool()) - filter = filter | MINE_WATCH_ONLY; + filter = filter | ISMINE_WATCH_ONLY; if (params[0].get_str() == "*") { // Calculate total balance a different way from GetBalance() @@ -786,7 +786,7 @@ Value sendfrom(const Array& params, bool fHelp) EnsureWalletIsUnlocked(); // Check funds - int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE); + int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE); if (nAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); @@ -863,7 +863,7 @@ Value sendmany(const Array& params, bool fHelp) EnsureWalletIsUnlocked(); // Check funds - int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE); + int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE); if (totalAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); @@ -953,10 +953,10 @@ Value ListReceived(const Array& params, bool fByAccounts) if (params.size() > 1) fIncludeEmpty = params[1].get_bool(); - isminefilter filter = MINE_SPENDABLE; + isminefilter filter = ISMINE_SPENDABLE; if(params.size() > 2) if(params[2].get_bool()) - filter = filter | MINE_WATCH_ONLY; + filter = filter | ISMINE_WATCH_ONLY; // Tally map<CBitcoinAddress, tallyitem> mapTally; @@ -985,7 +985,7 @@ Value ListReceived(const Array& params, bool fByAccounts) item.nAmount += txout.nValue; item.nConf = min(item.nConf, nDepth); item.txids.push_back(wtx.GetHash()); - if (mine & MINE_WATCH_ONLY) + if (mine & ISMINE_WATCH_ONLY) item.fIsWatchonly = true; } } @@ -1139,7 +1139,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter); bool fAllAccounts = (strAccount == string("*")); - bool involvesWatchonly = wtx.IsFromMe(MINE_WATCH_ONLY); + bool involvesWatchonly = wtx.IsFromMe(ISMINE_WATCH_ONLY); // Sent if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) @@ -1147,7 +1147,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) { Object entry; - if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & MINE_WATCH_ONLY)) + if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & ISMINE_WATCH_ONLY)) entry.push_back(Pair("involvesWatchonly", true)); entry.push_back(Pair("account", strSentAccount)); MaybePushAddress(entry, s.first); @@ -1171,7 +1171,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe if (fAllAccounts || (account == strAccount)) { Object entry; - if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & MINE_WATCH_ONLY)) + if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & ISMINE_WATCH_ONLY)) entry.push_back(Pair("involvesWatchonly", true)); entry.push_back(Pair("account", account)); MaybePushAddress(entry, r.first); @@ -1285,10 +1285,10 @@ Value listtransactions(const Array& params, bool fHelp) int nFrom = 0; if (params.size() > 2) nFrom = params[2].get_int(); - isminefilter filter = MINE_SPENDABLE; + isminefilter filter = ISMINE_SPENDABLE; if(params.size() > 3) if(params[3].get_bool()) - filter = filter | MINE_WATCH_ONLY; + filter = filter | ISMINE_WATCH_ONLY; if (nCount < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count"); @@ -1359,10 +1359,10 @@ Value listaccounts(const Array& params, bool fHelp) int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); - isminefilter includeWatchonly = MINE_SPENDABLE; + isminefilter includeWatchonly = ISMINE_SPENDABLE; if(params.size() > 1) if(params[1].get_bool()) - includeWatchonly = includeWatchonly | MINE_WATCH_ONLY; + includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY; map<string, int64_t> mapAccountBalances; BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwalletMain->mapAddressBook) { @@ -1451,7 +1451,7 @@ Value listsinceblock(const Array& params, bool fHelp) CBlockIndex *pindex = NULL; int target_confirms = 1; - isminefilter filter = MINE_SPENDABLE; + isminefilter filter = ISMINE_SPENDABLE; if (params.size() > 0) { @@ -1473,7 +1473,7 @@ Value listsinceblock(const Array& params, bool fHelp) if(params.size() > 2) if(params[2].get_bool()) - filter = filter | MINE_WATCH_ONLY; + filter = filter | ISMINE_WATCH_ONLY; int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1; @@ -1542,10 +1542,10 @@ Value gettransaction(const Array& params, bool fHelp) uint256 hash; hash.SetHex(params[0].get_str()); - isminefilter filter = MINE_SPENDABLE; + isminefilter filter = ISMINE_SPENDABLE; if(params.size() > 1) if(params[1].get_bool()) - filter = filter | MINE_WATCH_ONLY; + filter = filter | ISMINE_WATCH_ONLY; Object entry; if (!pwalletMain->mapWallet.count(hash)) |