Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #388 +/- ##
==========================================
- Coverage 60.00% 59.66% -0.35%
==========================================
Files 25 25
Lines 4736 4552 -184
==========================================
- Hits 2842 2716 -126
+ Misses 1894 1836 -58
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tvpeter
left a comment
There was a problem hiding this comment.
Thank you @bvotteler for working on this fix.
I have left some comments
There was a problem hiding this comment.
Similar occurrence here, so check if you can fix it as well
There was a problem hiding this comment.
I can fix it (on it), but to add a test I think I would need a refactor that method to be able to set up a test.
Let me know if that would be useful in this PR, or to be added in a stacked PR. Or even better: If you can come up with a descriptor or different test setup that would make me hit that line naturally.
There was a problem hiding this comment.
Fixed the occurrence in fa33cba .
Just need to know if I should (or even need to) refactor the method to be able to test as part of this PR or split the refactor off to a separate one.
|
Also, please fix the PR title, it does not follow the Conventional Commit style. |
995999e to
f4b737b
Compare
Remove .expect() and unimplemented!() calls and replace them with errors. Wrap errors from derive_sp(). Return generic errors for the remaining cases.
Expect an error message to be propagated from derive_sp, wrapped with explanation that it occurred during silent payment transaction creation.
f4b737b to
386b61e
Compare
Description
Fixes #380.
Propagate an error rather than panic when
derive_spreturns an error insidecreate_sp_tx.This is done by:
From<SpSendError>forBDKCliErrorderive_sp([..]).expect([..]);withderive_sp([..])?;Expand: output before & after
Output before:
(For output with backtrace, see issue description for #380)
Output after:
$ target/debug/bdk-cli wallet --wallet wsh_wallet create_sp_tx \ --to-sp sprt1qqtnxgt7kn0fpr7fl0u0ndjj35f499y8t9hgmpkp8n2rmkr2gpjzyxqe3qp5n5apt0c5fas9xwy7002l0zqsuhrv7y9clz8yvhnmvut83lypguwer:20000 Error: Cannot create silent payment transaction: No available inputs for shared secret derivationNotes to the reviewers
The propagation method will do the same, either way. Therefore, I didn't try too hard to fabricate those scenarios. Happy to address that if preferred.
tests/integration/online.rsdespite the handler being insrc/handlers/offline.rs, simply because that is where the currently existing silent payment tests live.Happy to move the test to
tests/integrtion/offlineif that is preferable.Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: