Skip to content

abandontransaction needed after spending orphaned block reward #14148

Closed

Description

@domob1812

When a block reward is spent together with other outputs in the wallet and that block reward is later orphaned, the wallet does not show the other funds as available anymore. Even a -rescan is not enough - only -zapwallettxes or an explicit abandontransaction "recovers" the funds. I prepared a test case that shows this behaviour.

Is this a known issue or the expected behaviour? While this situation is something that will presumably not occur in practice (as it requires a long reorg), I wonder if that transaction should be automatically abandoned as it seems clear it won't be able to be confirmed anymore.

Activity

  1. promag commented on Sep 21, 2018

    @promag
    Contributor

    Why should it be automatically abandoned only when spending rewards? What if there is another reorg bringing back the reward?

  2. maflcko commented on Apr 26, 2020

    @maflcko
    Member

    Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?

  3. domob1812 commented on Apr 27, 2020

    @domob1812
    ContributorAuthor

    @MarcoFalke Yes, this still applies to current master. I've re-created a testcase showing this behaviour: test.zip

    Of course, @promag's point is valid. Perhaps that's the expected behaviour.

  4. maflcko commented on Apr 27, 2020

    @maflcko
    Member

    I think this is still a bug. Maybe submit the test case as a pull request, so that this can be fixed easier?

  5. domob1812 commented on Apr 28, 2020

    @domob1812
    ContributorAuthor

    @MarcoFalke Sure, created #18795.

  6. added a commit that references this issue on Jun 4, 2021
  7. 7 remaining items

  8. added a commit that references this issue on Dec 8, 2023
  9. locked and limited conversation to collaborators on Jan 30, 2024
  10. added a commit that references this issue on Sep 15, 2026
    3062de5
  11. added 2 commits that reference this issue on Sep 29, 2026
    80295ad
    f0a65b2
  12. added a commit that references this issue on Oct 1, 2026
    b1329b7
  13. added a commit that references this issue on Oct 1, 2026
    3e2b99a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions