-
Notifications
You must be signed in to change notification settings - Fork 324
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
More tests for IndexedTxGraph
and TxGraph
#958
Comments
I will give this one a shot. |
I will work on this |
What is meant by recovery in this context? We can insert things into a |
When we mutate a let merged_additions = todo!("this is the appended additions from previous operations");
let mut graph = TxGraph::<AnchorImplementation>::default();
graph.apply_additions(merged_additions); |
I will look into this one. |
Hey @LagginTimes I already made a sketch for it. Have you progressed quite a lot? Happy to chat and sync up on this to see if we have covered all the cases. If your PR is closer to finish happy to hand it over to you and move on to other parts. |
@rajarshimaitra No way have you started on that so quick. |
I included it in my PR as I was trying to cover all the cases with conflicts. PR soon. |
Test inserting anchors without the corresponding transaction and testing the recoverability of the transaction graph Partially fixes "More tests for IndexedTxGraph and TxGraph bitcoindevkit#958" bitcoindevkit#958
@notmandatory shall we move this issue out of alpha.2 milestone or is it required? |
Let's check with @evanlinjin and team on Tuesday. It probably still needs to be done but could go to an alpha.3 with any other testing, hardening, documentation, and examples improvements. |
Replaced by #1063 will close when that one is completed. |
Describe the enhancement
Now that #926 is merged, let's look at having more fine-grained tests.
Please comment below if you wish to work on a test (to avoid duplicate work!).
Proposed tests
For
TxGraph
Test behavior of inserting
Anchor
s without the corresponding transaction existing in the graph. We should allow for this behavior.txid
. EnsureAdditions
are as expected.Additions
of the previous step, and attempt to recover a newTxGraph
with them (this should succeed).txid
. Ensure anchors still exist.TxGraph
again with the appended additions.Test
TxGraph::get_chain_position
andTxGraph::list_chain_txs
behavior with unconfirmed conflicts. "Unconfirmed" can either mean that the txs do not have anchors, or that the anchors are not in the best chain. Both cases need to be tested.TxGraph
should always pick the transaction with the latestlast_seen
value. What happens if the conflicts have the samelast_seen
value? - @rajarshimaitraTest
TxGraph::get_chain_position
andTxGraph::list_chain_txs
behavior with unconfirmed transactions (txs with no anchors) that conflict with transactions that are confirmed. The unconfirmed transactions should not be givne a chain position or be listed. - @LagginTimesThe text was updated successfully, but these errors were encountered: