aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-04-29 15:45:44 +0000
committerBen Woosley <ben.woosley@gmail.com>2018-11-13 00:04:13 -0500
commit3002d6cf31821622e9f21d51e536cafc5cfb10ae (patch)
treea0831d207b5ca61d08285ac71212929817e5d8d4 /src/wallet/wallet.h
parentbb24d686500375564a2137f0940b329b6905bce6 (diff)
downloadbitcoin-3002d6cf31821622e9f21d51e536cafc5cfb10ae.tar.xz
Return a status enum from ScanForWalletTransactions
Return the failed block as an out var. This clarifies the outcome as the prior return value could be null due to user abort or failure.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index dcd1ee687b..08184bdc22 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -896,7 +896,13 @@ public:
void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex *pindex, const std::vector<CTransactionRef>& vtxConflicted) override;
void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) override;
int64_t RescanFromTime(int64_t startTime, const WalletRescanReserver& reserver, bool update);
- const CBlockIndex* ScanForWalletTransactions(const CBlockIndex* const pindexStart, const CBlockIndex* const pindexStop, const WalletRescanReserver& reserver, bool fUpdate = false);
+
+ enum class ScanResult {
+ SUCCESS,
+ FAILURE,
+ USER_ABORT
+ };
+ ScanResult ScanForWalletTransactions(const CBlockIndex* const pindexStart, const CBlockIndex* const pindexStop, const WalletRescanReserver& reserver, const CBlockIndex*& failed_block, bool fUpdate = false);
void TransactionRemovedFromMempool(const CTransactionRef &ptx) override;
void ReacceptWalletTransactions();
void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) override EXCLUSIVE_LOCKS_REQUIRED(cs_main);