bitcoin / bitcoin/bitcoin

wallet: Unrelated conflicted parent txs do not cause child txs to be marked as conflicted

Open
#29,435 7 comments 3 reactions 0 assignees View on GitHub
Wallet
Dominant language
C++
Stars
90.2k
Forks
39.4k
Avg merge
3d 8h
Merged PRs (30d)
88

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

If we receive a transaction which spends from an unconfirmed parent, and that parent is replaced, the child does not get marked as conflicted but rather only as inactive. If the child contains an input from our wallet, that input cannot be reused until the child is abandoned.

See also https://github.com/ACINQ/eclair/pull/2818

### Expected behaviour

We should try to detect if a such a child transaction becomes conflicted due to a parent becoming conflicted and mark it as such.

### Steps to reproduce

A (failing) test for this behavior can be found at https://github.com/achow101/bitcoin/commit/213fa91d5c289204e3f1e01194b1fccd08a69c6c

### Relevant log output

_No response_

### How did you obtain Bitcoin Core

Compiled from source

### What version of Bitcoin Core are you using?

master@128b4a80387d322a7810d8716eccdac95ff9b8cd

### Operating system and version

Arch

### Machine specifications

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.