Add test for inserting anchor without tx#961
Add test for inserting anchor without tx#961remix7531 wants to merge 4 commits intobitcoindevkit:masterfrom
Conversation
evanlinjin
left a comment
There was a problem hiding this comment.
Thanks for the work so far. Remember that we also want to test recovering the appended additions into a new graph. Refer to #958 (comment)
e4bdd6d to
df0b541
Compare
There was a problem hiding this comment.
Good work so far. Few notes.
- Ensure CI passes.
- Ensure GitHub can verify your commits (Maybe you need to give your PGP or SSH public key to GitHub?).
- Please rebase your commits into one.
- Use loops where you can (for example if you are inserting multiple anchors or multiple txs).
danielabrozzoni
left a comment
There was a problem hiding this comment.
A few improvements can be made:
- Fix the warnings
cargo clippyis throwing - Use a more descriptive commit message. Instead of "tests for issue958", describe which test you're adding in the title, and add "Partially fixes #958" in the description. In general, it should be possible to understand what a commit is doing from the title/description without having to open github
The rest looks good to me.
evanlinjin
left a comment
There was a problem hiding this comment.
Thank you again, sorry I think it will be better to reduce the scope of this test.
|
Since it looks like still a bit of work today I'm moving this out of the alpha.1 milestone. |
|
I do not understand what is missing here. The workflows failed because of this Just tested the workflows locally and it seams to work now. |
|
Hey @remix7531, sorry for the late response! I think you encountered a problem with our CI, that's why it would work locally but fail here. Can you try rebasing? |
|
Is this something still needed for 1.0.0-beta milestone ? (cc @notmandatory @ValuedMammal) I got a bit confused because I noticed that the #958 issue already has been closed but without the tests covered by this PR. |
|
I think it wouldn't hurt to have a test similar to this |
|
This testing could help with verifying sqlite schema question in #1712 |
18f5f3f test(sqlite): test persisting anchors and txs independently (valued mammal) 297ff34 test(chain): add test `insert_anchor_without_tx` (valued mammal) e69d10e doc(chain): document module `rusqlite_impl` (valued mammal) 8fa899b fix(chain): Sqlite - allow persisting anchor without tx (志宇) Pull request description: ### Description Previously, we may error when we insert an anchor where the txid being anchored has no corresponding tx. closes #1712 replaces #961 ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ### Changelog notice <!-- Notice the release manager should include in the release tag message changelog --> <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] 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 #### Bugfixes: * [ ] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: evanlinjin: ACK 18f5f3f ValuedMammal: ACK 18f5f3f Tree-SHA512: 7343eff857016f684cfb9f7af57f7be56ba36c70c36b8b4303159636f79ad5cc49a6f94354443323c9aa05c31ec7d43c22b038d9e41361596c3a346bd6a94b10
|
Tests for inserting anchor without tx already exist: bdk/crates/chain/tests/test_tx_graph.rs Lines 1074 to 1102 in f6c1c61 |
Description
This adds a test case described in issue958
All Submissions:
cargo fmtandcargo clippybefore committing