Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coinbase transaction that is not anchored in the best chain should always be filtered out #1144

Closed
evanlinjin opened this issue Oct 3, 2023 · 3 comments · Fixed by #1202
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@evanlinjin
Copy link
Member

Describe the bug

Coinbase transactions cannot exist in the mempool and be unconfirmed. TxGraph::try_get_chain_position should always return None for coinbase transactions which are not anchored in the best chain.

To Reproduce

A proper test has not been written for this scenario. The test would mine blocks which has the coinbase send to a tracked/owned spk. A reorg should not result in an unconfirmed balance.

Expected behavior

Coinbase transactions cannot be "unconfirmed".

@evanlinjin evanlinjin added the bug Something isn't working label Oct 3, 2023
@evanlinjin evanlinjin added this to the 1.0.0-alpha.3 milestone Oct 3, 2023
@evanlinjin
Copy link
Member Author

I recommend working on this only AFTER #1064 is merged.

@LagginTimes
Copy link
Contributor

I can take a look at this.

@evanlinjin
Copy link
Member Author

I can take a look at this.

Go for it. Base it on #1064 and I guess start with writing the test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants