Skip to content

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

@TheBlueMatt TheBlueMatt commented Dec 13, 2019

There's a big one coming up next, but this is easy so figured it can go first.

#408.

@TheBlueMatt TheBlueMatt added this to the 0.0.11 milestone Dec 13, 2019
Copy link

@ariard ariard left a 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
Copy link

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.

Copy link
Collaborator Author

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.

@TheBlueMatt TheBlueMatt force-pushed the 2019-12-simple-signer-api-step branch from 15d6281 to 4ebe64f Compare December 13, 2019 21:16
@codecov
Copy link

codecov bot commented Dec 13, 2019

Codecov Report

Merging #419 into master will increase coverage by <.01%.
The diff coverage is 89.28%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
lightning/src/util/enforcing_trait_impls.rs 100% <100%> (ø) ⬆️
lightning/src/chain/keysinterface.rs 96.26% <100%> (+0.36%) ⬆️
lightning/src/ln/channel.rs 84.78% <83.33%> (+0.02%) ⬆️
lightning/src/ln/functional_tests.rs 95.65% <0%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edab29e...4ebe64f. Read the comment docs.

@TheBlueMatt TheBlueMatt merged commit 3b76c77 into lightningdevkit:master Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants