You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning-background-processor/src/lib.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -345,7 +345,7 @@ mod tests {
345
345
use bitcoin::network::constants::Network;
346
346
use lightning::chain::{BestBlock,Confirm, chainmonitor};
347
347
use lightning::chain::channelmonitor::ANTI_REORG_DELAY;
348
-
use lightning::chain::keysinterface::{InMemorySigner,Recipient,KeysInterface,KeysManager};
348
+
use lightning::chain::keysinterface::{InMemorySigner,KeysInterface,KeysManager};
349
349
use lightning::chain::transaction::OutPoint;
350
350
use lightning::get_event_msg;
351
351
use lightning::ln::channelmanager::{BREAKDOWN_TIMEOUT,ChainParameters,ChannelManager,SimpleArcChannelManager};
@@ -428,7 +428,7 @@ mod tests {
428
428
let network_graph = Arc::new(NetworkGraph::new(genesis_block.header.block_hash()));
429
429
let net_graph_msg_handler = Some(Arc::new(NetGraphMsgHandler::new(network_graph.clone(),Some(chain_source.clone()), logger.clone())));
430
430
let msg_handler = MessageHandler{chan_handler:Arc::new(test_utils::TestChannelMessageHandler::new()),route_handler:Arc::new(test_utils::TestRoutingMessageHandler::new())};
431
-
let peer_manager = Arc::new(PeerManager::new(msg_handler, keys_manager.get_node_secret(Recipient::Node).unwrap(),&seed, logger.clone(),IgnoringMessageHandler{}));
431
+
let peer_manager = Arc::new(PeerManager::new(msg_handler, keys_manager.get_shared_secret_producer(),&seed, logger.clone(),IgnoringMessageHandler{}));
@@ -25,8 +25,9 @@ use bitcoin::hashes::sha256::Hash as Sha256;
25
25
use bitcoin::hashes::sha256d::HashasSha256dHash;
26
26
use bitcoin::hash_types::WPubkeyHash;
27
27
28
+
use bitcoin::secp256k1::ecdh::SharedSecret;
28
29
use bitcoin::secp256k1::key::{SecretKey,PublicKey};
29
-
use bitcoin::secp256k1::{Secp256k1,Signature,Signing};
30
+
use bitcoin::secp256k1::{Secp256k1,Signature,Signing,All,SignOnly};
30
31
use bitcoin::secp256k1::recovery::RecoverableSignature;
31
32
use bitcoin::secp256k1;
32
33
@@ -37,7 +38,7 @@ use util::ser::{Writeable, Writer, Readable, ReadableArgs};
37
38
use chain::transaction::OutPoint;
38
39
use ln::{chan_utils,PaymentPreimage};
39
40
use ln::chan_utils::{HTLCOutputInCommitment, make_funding_redeemscript,ChannelPublicKeys,HolderCommitmentTransaction,ChannelTransactionParameters,CommitmentTransaction,ClosingTransaction};
40
-
use ln::msgs::UnsignedChannelAnnouncement;
41
+
use ln::msgs::{UnsignedChannelAnnouncement,UnsignedChannelUpdate,UnsignedNodeAnnouncement};
41
42
use ln::script::ShutdownScript;
42
43
43
44
use prelude::*;
@@ -392,32 +393,59 @@ pub enum Recipient {
392
393
PhantomNode,
393
394
}
394
395
395
-
/// A transport and onion encryptor / decryptor that uses the node key
396
-
pubtraitProtocolEncrypt{
397
-
/// Get node secret key (aka node_id or network_key) based on the provided [`Recipient`].
396
+
///
397
+
pubtraitSharedSecretProduce:Send + Sync{
398
398
///
399
-
/// This method must return the same value each time it is called with a given `Recipient`
Copy file name to clipboardExpand all lines: lightning/src/ln/channel.rs
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6265,13 +6265,13 @@ mod tests {
6265
6265
use ln::channel::{Channel,InboundHTLCOutput,OutboundHTLCOutput,InboundHTLCState,OutboundHTLCState,HTLCOutputInCommitment,HTLCCandidate,HTLCInitiator,TxCreationKeys};
6266
6266
use ln::channel::MAX_FUNDING_SATOSHIS;
6267
6267
use ln::features::InitFeatures;
6268
-
use ln::msgs::{ChannelUpdate,DataLossProtect,DecodeError,OptionalField,UnsignedChannelUpdate};
6268
+
use ln::msgs::{ChannelUpdate,DataLossProtect,DecodeError,OptionalField,UnsignedChannelUpdate,UnsignedNodeAnnouncement};
6269
6269
use ln::script::ShutdownScript;
6270
6270
use ln::chan_utils;
6271
6271
use ln::chan_utils::{ChannelPublicKeys,HolderCommitmentTransaction,CounterpartyChannelTransactionParameters, htlc_success_tx_weight, htlc_timeout_tx_weight};
6272
6272
use chain::BestBlock;
6273
6273
use chain::chaininterface::{FeeEstimator,ConfirmationTarget};
6274
-
use chain::keysinterface::{InMemorySigner,Recipient,KeyMaterial,KeysInterface,BaseSign,InMemoryProtocolEncryptor};
6274
+
use chain::keysinterface::{InMemorySigner,Recipient,KeyMaterial,KeysInterface,BaseSign,SharedSecretProduce};
6275
6275
use chain::transaction::OutPoint;
6276
6276
use util::config::UserConfig;
6277
6277
use util::enforcing_trait_impls::EnforcingSigner;
@@ -6280,6 +6280,7 @@ mod tests {
6280
6280
use util::test_utils::OnGetShutdownScriptpubkey;
6281
6281
use util::logger::Logger;
6282
6282
use bitcoin::secp256k1::{Secp256k1,Message,Signature,All};
6283
+
use bitcoin::secp256k1::ecdh::SharedSecret;
6283
6284
use bitcoin::secp256k1::ffi::SignatureasFFISignature;
6284
6285
use bitcoin::secp256k1::key::{SecretKey,PublicKey};
6285
6286
use bitcoin::secp256k1::recovery::RecoverableSignature;
0 commit comments