Fix rescanblockchain rpc to properly report progress #13079
pull Empact wants to merge 1 commits into bitcoin:master from Empact:scan-for-wallet-stopblock-progress changing 1 files +18 −14-
Empact commented at 8:36 pm on April 25, 2018: memberPreviously it assumed tip in all cases. This also extracts a RescanVerificationProgress helper object whose role is to manage reporting, in order to simplify ScanForWalletTransactions - more lines in total, but much simpler to follow the core logic.
-
in src/wallet/wallet.cpp:1728 in b5fe7a2737 outdated
1723+ 1724+public: 1725+ RescanVerificationProgress(const CWallet& wallet, const CBlockIndex* const stop_block) 1726+ : m_wallet(wallet), m_time(GetTime()), m_stop_block(stop_block) {} 1727+ 1728+ void Start(const CBlockIndex* const start_block)
skeees commented at 8:54 pm on April 25, 2018:simpler to RAII this instead of a separate Constructor/Start/AnnounceStart methods?
Empact commented at 9:03 pm on April 25, 2018:The main reason I kept this separate is thatGuessVerificationProgress
needscs_main
held, and I wanted to minimize the amount of code in the lock-block.fanquake added the label Wallet on Apr 25, 2018Empact force-pushed on Apr 30, 2018Empact renamed this:
Fix ScanForWalletTransactions to report progress correctly when a pindexStop is supplied
Fix rescanblockchain rpc to property report progress
on Apr 30, 2018Empact commented at 7:07 am on April 30, 2018: memberRemoved the refactoring for easier review.jonasschnelli commented at 12:05 pm on April 30, 2018: contributorMakes sense. Reporting progress for partial rescans based on the given range seems to be more logical. utACK 409db40b6f56748a5b1713a0bc117a8365d9f3efin src/wallet/wallet.cpp:1742 in 409db40b6f outdated
1741@@ -1742,9 +1742,13 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, CBlock 1742 double dProgressTip;
MarcoFalke commented at 12:48 pm on April 30, 2018:should probably be calledprogress_end
in src/wallet/wallet.cpp:1747 in 409db40b6f outdated
1741@@ -1742,9 +1742,13 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, CBlock 1742 double dProgressTip; 1743 { 1744 LOCK(cs_main); 1745- tip = chainActive.Tip(); 1746 dProgressStart = GuessVerificationProgress(chainParams.TxData(), pindex); 1747- dProgressTip = GuessVerificationProgress(chainParams.TxData(), tip); 1748+ if (pindexStop == nullptr) { 1749+ tip = chainActive.Tip()
MarcoFalke commented at 12:49 pm on April 30, 2018:missing semicolon, also wrong indentation.MarcoFalke commented at 12:49 pm on April 30, 2018: memberutACK 409db40laanwj commented at 12:59 pm on April 30, 2018: memberFrom travis:
0wallet/wallet.cpp: In member function ‘CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex*, CBlockIndex*, const WalletRescanReserver&, bool)’: 1wallet/wallet.cpp:1748:15: error: expected ‘;’ before ‘dProgressTip’ 2 dProgressTip = GuessVerificationProgress(chainParams.TxData(), tip); 3 ^
Empact force-pushed on Apr 30, 2018Empact commented at 2:38 pm on April 30, 2018: memberAdded semicolon, renamed progress vars toprogress_*
, and clang-formatted.Empact renamed this:
Fix rescanblockchain rpc to property report progress
Fix rescanblockchain rpc to properly report progress
on Apr 30, 2018Fix rescanblockchain rpc to property report progress
CWallet::ScanForWalletTransactions did not previously take into account pindexStop when calculating progress. Renamed progress vars to progress_*. rescanblockchain is the only rpc that uses this parameter.
Empact force-pushed on May 3, 2018Empact commented at 5:20 pm on May 3, 2018: memberRebasedTheBlueMatt commented at 7:16 pm on May 6, 2018: memberutACK 16be13345e4f9ab9186570c83828db94e3a3d607MarcoFalke commented at 7:34 pm on May 6, 2018: memberutACK 16be13345e4f9ab9186570c83828db94e3a3d607jonasschnelli commented at 1:02 pm on May 7, 2018: contributorTested ACK 16be13345e4f9ab9186570c83828db94e3a3d607jonasschnelli merged this on May 7, 2018jonasschnelli closed this on May 7, 2018
jonasschnelli referenced this in commit 5778d44aa8 on May 7, 2018promag commented at 1:16 pm on May 7, 2018: memberutACK 16be133.Empact deleted the branch on May 7, 2018jasonbcox referenced this in commit d559f01c77 on Sep 27, 2019jonspock referenced this in commit 9a37ea937f on Dec 24, 2019jonspock referenced this in commit 6c891d00ca on Dec 26, 2019jonspock referenced this in commit 94a72eabc1 on Dec 27, 2019PastaPastaPasta referenced this in commit 718f2d84df on Jun 17, 2020PastaPastaPasta referenced this in commit 49d0859fb6 on Jun 27, 2020PastaPastaPasta referenced this in commit c0a47bdfcb on Jun 28, 2020karra75 commented at 9:34 am on December 17, 2020: noneUkarra75 commented at 2:01 pm on December 17, 2020: noneSorceDrahtBot locked this on Feb 15, 2022
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me