-
Notifications
You must be signed in to change notification settings - Fork 385
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
Sanity check for ChannelManager and KeysInterface #1250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
While you're here, can you also add a similar script check in KeysManager::spend_spendable_outputs
in the second for loop in the SpendableOutputDescriptor::StaticOutput
match variant?
Codecov Report
@@ Coverage Diff @@
## main #1250 +/- ##
==========================================
- Coverage 90.42% 90.39% -0.04%
==========================================
Files 70 70
Lines 38087 38131 +44
==========================================
+ Hits 34441 34467 +26
- Misses 3646 3664 +18
Continue to review full report at Codecov.
|
@TheBlueMatt I created the script from segwit script hash for spendable_outputs: let payment_script = bitcoin::Address::p2wsh(&witness_script, Network::Testnet).script_pubkey();
assert_eq!(payment_script, output.script_pubkey); I ran the tests locally and they seem to be failing. Maybe I'm doing something wrong? |
This should also be a p2wpkh, not p2wsh. |
ff874fc
to
1dff756
Compare
@TheBlueMatt I'm done with the changes for the pr but I'm facing issues with squashing the commits 😭 |
The Bitcoin Core docs have some discussion of how to do it at https://github.com/bitcoin/bitcoin/blob/master/doc/productivity.md |
84ba02a
to
1dff756
Compare
@TheBlueMatt I was trying to rebase and squash the 6 commits but by the time I'm done with it, the branch is behind by like 390 commits and when I force push I see a lot of other changes. |
You shouldn't need to rebase unless there is a conflict (there currently is not). If you're using rebase, it may be simplest to rebase on top of |
That worked! I was trying to do |
d94fe37
to
2e45d68
Compare
@TheBlueMatt Valentine had pointed out how the docs for the methods in keysinterface mention the conditions under which Err is returned, so I went ahead and updated them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the docs updates!
Fix build errors Create script using p2wsh for comparison Using p2wpkh for generating the payment script spendable_outputs sanity check Return err in spendable_outputs Doc updates in keysinterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This fixes #1174.