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

Implement ReOrg test that changes the index of a sent tx #627

Closed
wants to merge 6 commits into from

Conversation

pacu
Copy link
Collaborator

@pacu pacu commented Oct 25, 2023

closes #626
closes pacu/zwcd#43

Verifies that the wallet reacts properly to a reorg that changes the
block_height of a transaction that was confirmed in a block prior and
moved to a newer block and confirmed again.

This also disables TreeState verification for feature `darkside_tests`

Add features to disable TreeState verification on `darkside_tests`
Closes zingolabs#614

In this case the wallet receives a transaction and a reorg removes it
from the chain. This can happen if the "best chain" does not contain
that transaction, and the subsequent blocks don't include it either.

1. Setup w/ default dataset with a received transaction at `received_tx_height`
2. sync up to `received_tx_height` minus some blocks.
3. capture balance
4. sync up to `received_tx_height` or higher and capture txid of the received transaction
5. trigger the reorg that removes the received transaction from the chain
6. sync to chaintip (the wallet should recover from the reorg)7
7. verify that the balance is equal to step 3 and that the txid found on step 4
is not present anymore.

uses dataset: zingolabs/darksidewalletd-datasets#14
Closes pacu/zwcd#45
Closes zingolabs#620

cargo fmt

add docs and adjust code to the docs
@fluidvanadium
Copy link
Contributor

hey pacu, the checks dont pass because of cargo clippy. can you satisfy clippy and then i will review?

@pacu
Copy link
Collaborator Author

pacu commented Nov 23, 2023

replaced by #716

@pacu pacu closed this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ReOrg test that changes the index of a sent tx Implement Reorg Changes Outbound Tx Index
2 participants