Interrupting CWallet::AddToWallet requires rescan #1535

issue luke-jr opened this issue on June 29, 2012
  1. luke-jr commented at 4:49 PM on June 29, 2012: member

    If I interrupt CWallet::AddToWallet at the start, while it is adding a new coinbase transaction (or probably any first-seen-in-block) - for example with "quit" in GDB or SIGKILL - after restarting, Bitcoin-Qt (and bitcoind?) will not pick up on this transaction even after completely catching up. -rescan is then needed to see it.

  2. gmaxwell commented at 4:54 PM on June 29, 2012: contributor

    Based on the reports on IRC we clearly have some cases where txn are get missed but I've not seen any easy way to pin them down. Assuming the issues are shutdown related. It might be useful to always rescan the last couple block before the wallets claimed height.

  3. luke-jr commented at 5:05 PM on June 29, 2012: member

    I was hoping the details in this report would make finding and fixing the real cause easier :)

  4. TheBlueMatt commented at 6:22 PM on January 23, 2017: member

    This may be because SetBestChain is called when the block state is flushed, irregardless of whether the wallet is currently doing ScanForWalletTransactions. eg if a user starts Bitcoin Core, it is running wallet scan, they try to stop the node, and it takes too long so they kill it (because wallet rescan is uninterruptible, I believe), the wallet best tip pointer may be set based on blocks which were flushed to disk (eg via FlushStateToDisk() in Shutdown()).

  5. laanwj removed the label Priority Medium on Apr 25, 2017
  6. suprnurd referenced this in commit 290fb3b57e on Dec 5, 2017
  7. promag commented at 11:46 PM on December 6, 2017: member

    Bump. What could be done here?

  8. TheBlueMatt commented at 11:51 PM on December 7, 2017: member

    I'd bet this is no longer a bug, and given it was never reported to be reproduceible, I'd suggest close.

  9. MarcoFalke closed this on Dec 8, 2017

  10. lateminer referenced this in commit 6778995630 on Jan 22, 2019
  11. lateminer referenced this in commit 7d25604239 on May 6, 2020
  12. MarcoFalke locked this on Sep 8, 2021

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: 2026-04-14 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me