Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
static void RescanWallet(CWallet& wallet, const WalletRescanReserver& reserver, int64_t time_begin = TIMESTAMP_MIN, bool update = true) { int64_t scanned_time = wallet.RescanFromTime(time_begin, reserver, update); if (wallet.IsAbortingRescan()) { throw JSONRPCError(RPC_MISC_ERROR, “Rescan aborted by user.”); } else if (scanned_time > time_begin) { throw JSONRPCError(RPC_WALLET_ERROR, “Rescan was unable to fully rescan the blockchain. Some transactions may be missing.”); } }
Expected behaviour
static void RescanWallet(CWallet& wallet, const WalletRescanReserver& reserver, int64_t time_begin = TIMESTAMP_MIN, bool update = true) { if (!reserver.isReserved()) { throw JSONRPCError(RPC_WALLET_ERROR, “Rescan reservation failed. Wallet is currently rescanning or reservation was not acquired.”); } int64_t scanned_time = wallet.RescanFromTime(time_begin, reserver, update); if (wallet.IsAbortingRescan()) { throw JSONRPCError(RPC_MISC_ERROR, “Rescan aborted by user.”); } else if (scanned_time > time_begin) { throw JSONRPCError(RPC_WALLET_ERROR, “Rescan was unable to fully rescan the blockchain. Some transactions may be missing.”); } }
Steps to reproduce
None
Relevant log output
None
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
Current
Operating system and version
Ubuntu 22.04
Machine specifications
none