Generate Events from ChannelMonitor to indicate spendable ouputs
[rust-lightning] / src / ln / channel.rs
index 6b1511387d61d0048c8e8b1b29b81378df81c1b3..e8d7f538fd900719450f58c77fec9d8b9f4463cf 100644 (file)
@@ -489,8 +489,7 @@ impl Channel {
                let secp_ctx = Secp256k1::new();
                let our_channel_monitor_claim_key_hash = Hash160::from_data(&PublicKey::from_secret_key(&secp_ctx, &chan_keys.channel_monitor_claim_key).serialize());
                let our_channel_monitor_claim_script = Builder::new().push_opcode(opcodes::All::OP_PUSHBYTES_0).push_slice(&our_channel_monitor_claim_key_hash[..]).into_script();
-               let channel_monitor = ChannelMonitor::new(&chan_keys.revocation_base_key,
-                                                         &PublicKey::from_secret_key(&secp_ctx, &chan_keys.delayed_payment_base_key),
+               let channel_monitor = ChannelMonitor::new(&chan_keys.revocation_base_key, &chan_keys.delayed_payment_base_key,
                                                          &chan_keys.htlc_base_key,
                                                          BREAKDOWN_TIMEOUT, our_channel_monitor_claim_script);
 
@@ -651,8 +650,7 @@ impl Channel {
                let secp_ctx = Secp256k1::new();
                let our_channel_monitor_claim_key_hash = Hash160::from_data(&PublicKey::from_secret_key(&secp_ctx, &chan_keys.channel_monitor_claim_key).serialize());
                let our_channel_monitor_claim_script = Builder::new().push_opcode(opcodes::All::OP_PUSHBYTES_0).push_slice(&our_channel_monitor_claim_key_hash[..]).into_script();
-               let mut channel_monitor = ChannelMonitor::new(&chan_keys.revocation_base_key,
-                                                             &PublicKey::from_secret_key(&secp_ctx, &chan_keys.delayed_payment_base_key),
+               let mut channel_monitor = ChannelMonitor::new(&chan_keys.revocation_base_key, &chan_keys.delayed_payment_base_key,
                                                              &chan_keys.htlc_base_key,
                                                              BREAKDOWN_TIMEOUT, our_channel_monitor_claim_script);
                channel_monitor.set_their_base_keys(&msg.htlc_basepoint, &msg.delayed_payment_basepoint);