Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 2,999 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{RPCResult::Type::NUM, "duration", | {RPCResult::Type::NUM, "duration", | ||||
"elapsed seconds since scan start"}, | "elapsed seconds since scan start"}, | ||||
{RPCResult::Type::NUM, "progress", | {RPCResult::Type::NUM, "progress", | ||||
"scanning progress percentage [0.0, 1.0]"}, | "scanning progress percentage [0.0, 1.0]"}, | ||||
}}, | }}, | ||||
{RPCResult::Type::BOOL, "avoid_reuse", | {RPCResult::Type::BOOL, "avoid_reuse", | ||||
"whether this wallet tracks clean/dirty coins in terms of " | "whether this wallet tracks clean/dirty coins in terms of " | ||||
"reuse"}, | "reuse"}, | ||||
{RPCResult::Type::BOOL, "descriptors", | |||||
"whether this wallet uses descriptors for scriptPubKey " | |||||
"management"}, | |||||
}}, | }}, | ||||
}, | }, | ||||
RPCExamples{HelpExampleCli("getwalletinfo", "") + | RPCExamples{HelpExampleCli("getwalletinfo", "") + | ||||
HelpExampleRpc("getwalletinfo", "")}, | HelpExampleRpc("getwalletinfo", "")}, | ||||
} | } | ||||
.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 | ||||
Show All 39 Lines | if (pwallet->IsScanning()) { | ||||
scanning.pushKV("duration", pwallet->ScanningDuration() / 1000); | scanning.pushKV("duration", pwallet->ScanningDuration() / 1000); | ||||
scanning.pushKV("progress", pwallet->ScanningProgress()); | scanning.pushKV("progress", pwallet->ScanningProgress()); | ||||
obj.pushKV("scanning", scanning); | obj.pushKV("scanning", scanning); | ||||
} else { | } else { | ||||
obj.pushKV("scanning", false); | obj.pushKV("scanning", false); | ||||
} | } | ||||
obj.pushKV("avoid_reuse", | obj.pushKV("avoid_reuse", | ||||
pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE)); | pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE)); | ||||
obj.pushKV("descriptors", | |||||
pwallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)); | |||||
return obj; | return obj; | ||||
} | } | ||||
static UniValue listwalletdir(const Config &config, | static UniValue listwalletdir(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"listwalletdir", | "listwalletdir", | ||||
"Returns a list of wallets in the wallet directory.\n", | "Returns a list of wallets in the wallet directory.\n", | ||||
▲ Show 20 Lines • Show All 1,971 Lines • Show Last 20 Lines |