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

reorg expires incoming transaction #16

Conversation

pacu
Copy link
Collaborator

@pacu pacu commented Oct 21, 2023

[#15] Create a reorg test that removes an incoming transaction

closes #15
closes pacu/zwcd#45

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 trans
    action
  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.

closes #15
closes pacu/zwcd#45

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.
@pacu pacu changed the base branch from dev to arot-changes-mined-tx-index October 21, 2023 14:31
@pacu pacu closed this Nov 21, 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.

Create a reorg test that removes an incoming transaction Implement ReOrg Expires Inbound Transaction
1 participant