MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RescanWallet

Function RescanWallet

src/wallet/rpcdump.cpp:91–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89static const int64_t TIMESTAMP_MIN = 0;
90
91static void RescanWallet(CWallet& wallet, const WalletRescanReserver& reserver, int64_t time_begin = TIMESTAMP_MIN, bool update = true)
92{
93 int64_t scanned_time = wallet.RescanFromTime(time_begin, reserver, update);
94 if (wallet.IsAbortingRescan()) {
95 throw JSONRPCError(RPC_MISC_ERROR, "Rescan aborted by user.");
96 } else if (scanned_time > time_begin) {
97 throw JSONRPCError(RPC_WALLET_ERROR, "Rescan was unable to fully rescan the blockchain. Some transactions may be missing.");
98 }
99}
100
101UniValue importprivkey(const JSONRPCRequest& request)
102{

Callers 4

importprivkeyFunction · 0.85
importaddressFunction · 0.85
importpubkeyFunction · 0.85
importwalletFunction · 0.85

Calls 3

JSONRPCErrorFunction · 0.85
RescanFromTimeMethod · 0.80
IsAbortingRescanMethod · 0.80

Tested by

no test coverage detected