File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2402,6 +2402,11 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
24022402 " \" paytxfee\" : x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + " /kB\n "
24032403 " \" hdseedid\" : \" <hash160>\" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)\n "
24042404 " \" private_keys_enabled\" : true|false (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet)\n "
2405+ " \" scanning\" : (json object) current scanning details, or false if no scan is in progress\n "
2406+ " {\n "
2407+ " \" duration\" : xxxx (numeric) elapsed seconds since scan start\n "
2408+ " \" progress\" : x.xxxx, (numeric) scanning progress percentage [0.0, 1.0]\n "
2409+ " }\n "
24052410 " }\n "
24062411 },
24072412 RPCExamples{
@@ -2441,6 +2446,14 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
24412446 obj.pushKV (" hdseedid" , seed_id.GetHex ());
24422447 }
24432448 obj.pushKV (" private_keys_enabled" , !pwallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS));
2449+ if (pwallet->IsScanning ()) {
2450+ UniValue scanning (UniValue::VOBJ);
2451+ scanning.pushKV (" duration" , pwallet->ScanningDuration () / 1000 );
2452+ scanning.pushKV (" progress" , pwallet->ScanningProgress ());
2453+ obj.pushKV (" scanning" , scanning);
2454+ } else {
2455+ obj.pushKV (" scanning" , false );
2456+ }
24442457 return obj;
24452458}
24462459
You can’t perform that action at this time.
0 commit comments