mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-14 16:50:17 +02:00
wallet: remove update argument from RescanFromTime method
Its only usage passes true.
This commit is contained in:
@@ -407,7 +407,7 @@ RPCMethod importdescriptors()
|
||||
|
||||
// Rescan the blockchain using the lowest timestamp
|
||||
if (rescan) {
|
||||
int64_t scanned_time = pwallet->RescanFromTime(lowest_timestamp, reserver, /*update=*/true);
|
||||
int64_t scanned_time = pwallet->RescanFromTime(lowest_timestamp, reserver);
|
||||
pwallet->ResubmitWalletTransactions(node::TxBroadcast::MEMPOOL_NO_BROADCAST, /*force=*/true);
|
||||
|
||||
if (pwallet->IsAbortingRescan()) {
|
||||
|
||||
@@ -1824,7 +1824,7 @@ void CWallet::MaybeUpdateBirthTime(int64_t time)
|
||||
* @return Earliest timestamp that could be successfully scanned from. Timestamp
|
||||
* returned will be higher than startTime if relevant blocks could not be read.
|
||||
*/
|
||||
int64_t CWallet::RescanFromTime(int64_t startTime, const WalletRescanReserver& reserver, bool update)
|
||||
int64_t CWallet::RescanFromTime(int64_t startTime, const WalletRescanReserver& reserver)
|
||||
{
|
||||
// Find starting block. May be null if nCreateTime is greater than the
|
||||
// highest blockchain timestamp, in which case there is nothing that needs
|
||||
@@ -1836,7 +1836,7 @@ int64_t CWallet::RescanFromTime(int64_t startTime, const WalletRescanReserver& r
|
||||
|
||||
if (start) {
|
||||
// TODO: this should take into account failure by ScanResult::USER_ABORT
|
||||
ScanResult result = ScanForWalletTransactions(start_block, start_height, /*max_height=*/{}, reserver, /*fUpdate=*/update, /*save_progress=*/false);
|
||||
ScanResult result = ScanForWalletTransactions(start_block, start_height, /*max_height=*/{}, reserver, /*fUpdate=*/true, /*save_progress=*/false);
|
||||
if (result.status == ScanResult::FAILURE) {
|
||||
int64_t time_max;
|
||||
CHECK_NONFATAL(chain().findBlock(result.last_failed_block, FoundBlock().maxTime(time_max)));
|
||||
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
void blockConnected(const kernel::ChainstateRole& role, const interfaces::BlockInfo& block) override;
|
||||
void blockDisconnected(const interfaces::BlockInfo& block) override;
|
||||
void updatedBlockTip() override;
|
||||
int64_t RescanFromTime(int64_t startTime, const WalletRescanReserver& reserver, bool update);
|
||||
int64_t RescanFromTime(int64_t startTime, const WalletRescanReserver& reserver);
|
||||
|
||||
struct ScanResult {
|
||||
enum { SUCCESS, FAILURE, USER_ABORT } status = SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user