Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 6, 2020

Wallet RPCs that allow a rescan based on block-timestamp or block-height
need to sync with the active chain first, because the user might assume
the wallet is up-to-date with the latest block they got reported via a
blockchain RPC.

@luke-jr
Copy link
Member

luke-jr commented Dec 13, 2020

Wouldn't it make more sense to do this conditional on that particular use case?

@luke-jr
Copy link
Member

luke-jr commented Dec 13, 2020

Actually, when would this matter at all? If the wallet is on a stale chain, the process of reorganising should do the rescan for the user anyway?

@maflcko
Copy link
Member Author

maflcko commented Dec 14, 2020

Actually, when would this matter at all?

When you pass in the height or time of a block in the active chain that the wallet hasn't yet caught up with. For example, the active chain is at height=100, the wallet at height=90. A user specifies a range to rescan=[95,100], which wouldn't succeed.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 2, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #23667 (Split up rpcwallet by meshcollider)

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.

Wallet RPCs that allow a rescan based on block-timestamp or block-height
need to sync with the active chain first, because the user might assume
the wallet is up-to-date with the latest block they got reported via a
blockchain RPC.
Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK fa5362a

@maflcko maflcko merged commit 89ea2b3 into bitcoin:master Dec 7, 2021
@maflcko maflcko deleted the 2012-walletSync branch December 7, 2021 08:28
@bitcoin bitcoin deleted a comment from alirezaayande Dec 7, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 7, 2021
…to wallet RPCs

fa5362a rpc: Add missing BlockUntilSyncedToCurrentChain to wallet RPCs (MarcoFalke)

Pull request description:

  Wallet RPCs that allow a rescan based on block-timestamp or block-height
  need to sync with the active chain first, because the user might assume
  the wallet is up-to-date with the latest block they got reported via a
  blockchain RPC.

ACKs for top commit:
  meshcollider:
    utACK fa5362a

Tree-SHA512: d4831f1f08f854f9a49fc969de86c438f856e41c2163c801a6ff36dc2f6299cb342b44663279c524a8b7ca9a50895db1243cd7d49bed79277ada857213f20a26
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
…ntChain to wallet RPCs

1f62ab7 rpc: Add missing BlockUntilSyncedToCurrentChain to wallet RPCs (MarcoFalke)

Pull request description:

  Wallet RPCs that allow a rescan based on block-timestamp or block-height
  need to sync with the active chain first, because the user might assume
  the wallet is up-to-date with the latest block they got reported via a
  blockchain RPC.

ACKs for top commit:
  meshcollider:
    utACK 1f62ab7

Tree-SHA512: d4831f1f08f854f9a49fc969de86c438f856e41c2163c801a6ff36dc2f6299cb342b44663279c524a8b7ca9a50895db1243cd7d49bed79277ada857213f20a26
@bitcoin bitcoin locked and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants