Skip to content

Test status of reorg tx#1124

Closed
vladimirfomene wants to merge 13 commits intobitcoindevkit:masterfrom
vladimirfomene:test_status_of_reorg_tx
Closed

Test status of reorg tx#1124
vladimirfomene wants to merge 13 commits intobitcoindevkit:masterfrom
vladimirfomene:test_status_of_reorg_tx

Conversation

@vladimirfomene
Copy link
Copy Markdown
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
Co-authored-by: Steve Myers <steve@notmandatory.org>
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
Copy Markdown
Member

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

@vladimirfomene
Copy link
Copy Markdown
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

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants