Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 2,918 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
.Check(request); | .Check(request); | ||||
// Make sure the results are valid at least up to the most recent block | // Make sure the results are valid at least up to the most recent block | ||||
// the user could have gotten from another RPC command prior to now | // the user could have gotten from another RPC command prior to now | ||||
wallet.BlockUntilSyncedToCurrentChain(); | wallet.BlockUntilSyncedToCurrentChain(); | ||||
LOCK(wallet.cs_wallet); | LOCK(wallet.cs_wallet); | ||||
UniValue obj(UniValue::VOBJ); | |||||
const auto bal = wallet.GetBalance(); | const auto bal = wallet.GetBalance(); | ||||
UniValue balances{UniValue::VOBJ}; | UniValue balances{UniValue::VOBJ}; | ||||
{ | { | ||||
UniValue balances_mine{UniValue::VOBJ}; | UniValue balances_mine{UniValue::VOBJ}; | ||||
balances_mine.pushKV("trusted", ValueFromAmount(bal.m_mine_trusted)); | balances_mine.pushKV("trusted", ValueFromAmount(bal.m_mine_trusted)); | ||||
balances_mine.pushKV("untrusted_pending", | balances_mine.pushKV("untrusted_pending", | ||||
ValueFromAmount(bal.m_mine_untrusted_pending)); | ValueFromAmount(bal.m_mine_untrusted_pending)); | ||||
balances_mine.pushKV("immature", ValueFromAmount(bal.m_mine_immature)); | balances_mine.pushKV("immature", ValueFromAmount(bal.m_mine_immature)); | ||||
▲ Show 20 Lines • Show All 2,158 Lines • Show Last 20 Lines |