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

Test status of reorg tx #1124

Conversation

vladimirfomene
Copy link
Contributor

Description

This PR checks that the status of reorg transaction is unconfirmed. It builds on top of #1041.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

vladimirfomene and others added 13 commits August 26, 2023 22:23
We remove `ElectrumUpdate` and return tuples instead for `ElectrumExt`
methods. We introduce the `IncompleteTxGraph` structure to specifically
hodl the incomplete `TxGraph`.

This change is motivated by @LLFourn's comment: bitcoindevkit@794bf37#r1305432603
Also introduce `bitcoind_rpc` cli example.

Add tests:

* `test_sync_local_chain` ensures that `Emitter::emit_block` emits
  blocks in order, even after reorg.
* `test_into_tx_graph` ensures that `into_tx_graph` behaves
  appropriately for both mempool and block updates. It should also
filter txs and map anchors correctly.
Replaced `into_tx_graph_update` with `indexed_tx_graph_update`. The
latter returns a vec of `(tx, anchors, last_seen)` to be passed into
`IndexedTxGraph::insert_relevant_txs`.
@vladimirfomene vladimirfomene self-assigned this Sep 13, 2023
@nondiremanuel nondiremanuel added this to the 1.0.0-alpha.2 milestone Sep 23, 2023
@evanlinjin evanlinjin removed this from the 1.0.0-alpha.2 milestone Oct 8, 2023
@evanlinjin
Copy link
Member

Thank you for taking a crack at this. Due to time constraints, I've already implemented reorg tests in #1041

@vladimirfomene
Copy link
Contributor Author

@evanlinjin that is okay, I don't mind us closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants