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)
2402
2402
" \" paytxfee\" : x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + " /kB\n "
2403
2403
" \" hdseedid\" : \" <hash160>\" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)\n "
2404
2404
" \" 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 "
2405
2410
" }\n "
2406
2411
},
2407
2412
RPCExamples{
@@ -2441,6 +2446,14 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
2441
2446
obj.pushKV (" hdseedid" , seed_id.GetHex ());
2442
2447
}
2443
2448
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
+ }
2444
2457
return obj;
2445
2458
}
2446
2459
You can’t perform that action at this time.
0 commit comments