Empact
commented at 0:31 am on December 13, 2018:
member
By returning ScanResult from RescanFromTime and reporting the effectuality of AbortScan.
And consolidate rpc-level error handling across RescanFromTime and
ScanForWalletTransactions.
Note this changes the rescanblockchain scan failure error from
RPC_MISC_ERROR to RPC_WALLET_ERROR, which seems more appropriate and matches the
behavior from the rpcdump methods.
DrahtBot
commented at 2:02 am on December 13, 2018:
member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#18278 (interfaces: Describe and follow some code conventions by ryanofsky)
#17954 (wallet: Remove calls to Chain::Lock methods by ryanofsky)
#10102 ([experimental] Multiprocess bitcoin by ryanofsky)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Empact renamed this:
Wallet: Return a ScanResult from CWallet::RescanFromTime
wallet: Return a ScanResult from CWallet::RescanFromTime
on Dec 14, 2018
in
src/wallet/rpcdump.cpp:556
in
a71986a023outdated
This is a dead store since nTimeBegin is unconditionally written to on L573.
Perhaps you could drop the dead store and instead move the nTimeBegin = chainActive.Tip()->GetBlockTime(); to the line after LOCK(pwallet->cs_wallet);?
01: 99a72728a6 = 1: c82f6c7806 Return ScanResult from CWallet::RescanFromTime
12: 4b4cf7cc28 ! 2: 469117d55c Make scan / abort status private to CWallet
2@@ -2,7 +2,7 @@
3 4 Make scan / abort status private to CWallet
5 6- Drop CWallet::IsAbortingRescan and IsScanning by reporting the abort
7+ Drop CWallet::IsAbortingRescan by reporting the abort
8 effectuality from CWallet::AbortScan.
910 diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
11@@ -54,8 +54,7 @@
12 */
13 - void AbortRescan() { fAbortRescan = true; }
14 - bool IsAbortingRescan() { return fAbortRescan; }
15-- bool IsScanning() { return fScanningWallet; }
16 + bool AbortRescan();
17-
18- /**
19- * keystore implementation
20+ bool IsScanning() { return fScanningWallet; }
21+ int64_t ScanningDuration() const { return fScanningWallet ? GetTimeMillis() - m_scanning_start : 0; }
22+ double ScanningProgress() const { return fScanningWallet ? (double) m_scanning_progress : 0; }
re-utACK469117d55c3601c75883d8ca7ff5e76f9f60da60
DrahtBot added the label
Needs rebase
on Oct 29, 2019
Empact force-pushed
on Jan 17, 2020
DrahtBot removed the label
Needs rebase
on Jan 17, 2020
in
src/wallet/wallet.cpp:1573
in
bcb3fc0046outdated
1571@@ -1572,7 +1572,7 @@ void CWalletTx::GetAmounts(std::list<COutputEntry>& listReceived,
1572 * @return Earliest timestamp that could be successfully scanned from. Timestamp
1573 * returned will be higher than startTime if relevant blocks could not be read.
theStack
commented at 12:26 pm on February 7, 2020:
Now that this method doesn’t return a timestamp (int64_t) anymore, this Doxygen comment needs to be updated.
Add empty ( *) line before @ return. (See “Coding Style (Doxygen-compatible comments)” in developer.nodes.md)
in
src/wallet/wallet.h:905
in
319aeba7d4outdated
899+ * Scan the block chain (starting in start_block) for transactions
900+ * from or to us. If fUpdate is true, found transactions that already
901+ * exist in the wallet will be updated.
902+ *
903+ * @param[in] start_block Scan starting block. If block is not on the active
904+ * chain, the scan will return SUCCESS immediately.
This feels weird to me, and feels like it should have a new ORPHAN_CHAINScanResult, even if this is handled the same way as SUCCESS everywhere right now.
in
src/wallet/rpcdump.cpp:1433
in
319aeba7d4outdated
This differs from the original code, where scannedTime was set to the last block time + TIMESTAMP_WINDOW + 1. Won’t this result in missed scans below, as scannedTime will be low?
It’s a bit convoluted, but I think it’s handled gracefully: if fScanningWallet is set to false as fAbortRescan is being set to true (i.e. at the end of a scan), there is no issue as ScanForWalletTransactions sets fAbortRescan to false at its start.
Why does it matter the return value? Isn’t even documented.
Empact force-pushed
on Mar 11, 2020
DrahtBot
commented at 10:03 pm on March 23, 2020:
member
🐙 This pull request conflicts with the target branch and needs rebase.
DrahtBot added the label
Needs rebase
on Mar 23, 2020
laanwj
commented at 12:36 pm on September 9, 2021:
member
Any plans for this? It’s needed rebase for more than a year, no other activity.
DrahtBot
commented at 12:29 pm on December 22, 2021:
member
Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
Is it no longer relevant? ➡️ Please close.
Did the author lose interest or time to work on this? ➡️ Please close it and mark it ‘Up for grabs’ with the label, so that it can be picked up in the future.
MarcoFalke closed this
on Dec 22, 2021
MarcoFalke
commented at 12:37 pm on December 22, 2021:
member
Closing for now due to inactivity for more than a year. Can be reopened anytime. Just leave a comment here or in IRC.
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: 2025-04-30 00:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me