diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-02-14 12:07:00 -0500 |
---|---|---|
committer | Ivan Metlushko <metlushko@gmail.com> | 2021-05-19 08:50:20 +0200 |
commit | 44c430ffac940e1d1dd7f5939a495470bc694489 (patch) | |
tree | 1aeee116905157c9060e344a8ea47368f3b191ae /src/wallet/wallet.h | |
parent | e2a47ce08528dfb39c0340145c6977f6afd587f6 (diff) |
refactor: Add CWallet:::AttachChain method
This commit does not change behavior, it just moves code from
CWallet::CreateWalletFromFile to CWallet:::AttachChain so it can be updated in
the next commit.
This commit is most easily reviewed with
"git diff -w --color-moved=dimmed_zebra" or by diffing CWallet:::AttachChain
against the previous code with an external diff tool.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index a8ef200b2c..ec1415bf10 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -763,6 +763,13 @@ private: bool CreateTransactionInternal(const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign); + /** + * Catch wallet up to current chain, scanning new blocks, updating the best + * block locator and m_last_block_processed, and registering for + * notifications about new blocks and transactions. + */ + static bool AttachChain(const std::shared_ptr<CWallet>& wallet, interfaces::Chain& chain, bilingual_str& error, std::vector<bilingual_str>& warnings); + public: /** * Main wallet lock. |