MCPcopy Create free account
hub / github.com/ElementsProject/elements / RescanWallet

Function RescanWallet

src/wallet/rpc/backup.cpp:104–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102static const int64_t TIMESTAMP_MIN = 0;
103
104static void RescanWallet(CWallet& wallet, const WalletRescanReserver& reserver, int64_t time_begin = TIMESTAMP_MIN, bool update = true)
105{
106 int64_t scanned_time = wallet.RescanFromTime(time_begin, reserver, update);
107 if (wallet.IsAbortingRescan()) {
108 throw JSONRPCError(RPC_MISC_ERROR, "Rescan aborted by user.");
109 } else if (scanned_time > time_begin) {
110 throw JSONRPCError(RPC_WALLET_ERROR, "Rescan was unable to fully rescan the blockchain. Some transactions may be missing.");
111 }
112}
113
114RPCHelpMan importprivkey()
115{

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