-
Notifications
You must be signed in to change notification settings - Fork 407
Few more simple signer API additions #419
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
Few more simple signer API additions #419
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.
ACK 15d6281 modulo comment on absolute_fee
/feerate_per_kw
ambiguity
@@ -2665,14 +2665,16 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> { | |||
let proposed_total_fee_satoshis = proposed_feerate * tx_weight / 1000; | |||
|
|||
let (closing_tx, total_fee_satoshis) = self.build_closing_transaction(proposed_total_fee_satoshis, false); | |||
let funding_redeemscript = self.get_funding_redeemscript(); | |||
let sighash = hash_to_message!(&bip143::SighashComponents::new(&closing_tx).sighash_all(&closing_tx.input[0], &funding_redeemscript, self.channel_value_satoshis)[..]); | |||
let our_sig = self.local_keys |
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.
Something like if let Ok(our_sig) { Some() } else { None }
would avoid conversion to option and calling unwrap. Would make code easier to review too.
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.
Ehh, I dont think so? map_err()? is pretty clear.
15d6281
to
4ebe64f
Compare
Codecov Report
@@ Coverage Diff @@
## master #419 +/- ##
=========================================
+ Coverage 87.49% 87.5% +<.01%
=========================================
Files 30 30
Lines 16692 16733 +41
=========================================
+ Hits 14605 14642 +37
- Misses 2087 2091 +4
Continue to review full report at Codecov.
|
There's a big one coming up next, but this is easy so figured it can go first.
#408.