| 89 | static const int64_t TIMESTAMP_MIN = 0; |
| 90 | |
| 91 | static 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 | |
| 101 | UniValue importprivkey(const JSONRPCRequest& request) |
| 102 | { |
no test coverage detected