@@ -1108,11 +1108,11 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
1108
1108
fn build_remote_transaction_keys ( & self ) -> Result < TxCreationKeys , ChannelError > {
1109
1109
//TODO: Ensure that the payment_key derived here ends up in the library users' wallet as we
1110
1110
//may see payments to it!
1111
- let revocation_basepoint = PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . revocation_base_key ( ) ) ;
1111
+ let revocation_basepoint = & self . local_keys . pubkeys ( ) . revocation_basepoint ;
1112
1112
let htlc_basepoint = PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . htlc_base_key ( ) ) ;
1113
1113
let their_pubkeys = self . their_pubkeys . as_ref ( ) . unwrap ( ) ;
1114
1114
1115
- Ok ( secp_check ! ( TxCreationKeys :: new( & self . secp_ctx, & self . their_cur_commitment_point. unwrap( ) , & their_pubkeys. delayed_payment_basepoint, & their_pubkeys. htlc_basepoint, & revocation_basepoint, & htlc_basepoint) , "Remote tx keys generation got bogus keys" ) )
1115
+ Ok ( secp_check ! ( TxCreationKeys :: new( & self . secp_ctx, & self . their_cur_commitment_point. unwrap( ) , & their_pubkeys. delayed_payment_basepoint, & their_pubkeys. htlc_basepoint, revocation_basepoint, & htlc_basepoint) , "Remote tx keys generation got bogus keys" ) )
1116
1116
}
1117
1117
1118
1118
/// Gets the redeemscript for the funding transaction output (ie the funding transaction output
@@ -3314,7 +3314,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3314
3314
to_self_delay : self . our_to_self_delay ,
3315
3315
max_accepted_htlcs : OUR_MAX_HTLCS ,
3316
3316
funding_pubkey : self . local_keys . pubkeys ( ) . funding_pubkey ,
3317
- revocation_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . revocation_base_key ( ) ) ,
3317
+ revocation_basepoint : self . local_keys . pubkeys ( ) . revocation_basepoint ,
3318
3318
payment_point : self . local_keys . pubkeys ( ) . payment_point ,
3319
3319
delayed_payment_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . delayed_payment_base_key ( ) ) ,
3320
3320
htlc_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . htlc_base_key ( ) ) ,
@@ -3347,7 +3347,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3347
3347
to_self_delay : self . our_to_self_delay ,
3348
3348
max_accepted_htlcs : OUR_MAX_HTLCS ,
3349
3349
funding_pubkey : self . local_keys . pubkeys ( ) . funding_pubkey ,
3350
- revocation_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . revocation_base_key ( ) ) ,
3350
+ revocation_basepoint : self . local_keys . pubkeys ( ) . revocation_basepoint ,
3351
3351
payment_point : self . local_keys . pubkeys ( ) . payment_point ,
3352
3352
delayed_payment_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . delayed_payment_base_key ( ) ) ,
3353
3353
htlc_basepoint : PublicKey :: from_secret_key ( & self . secp_ctx , self . local_keys . htlc_base_key ( ) ) ,
0 commit comments