@@ -6,6 +6,7 @@ extern crate secp256k1;
6
6
use bitcoin:: blockdata:: block:: BlockHeader ;
7
7
use bitcoin:: blockdata:: transaction:: { Transaction , TxOut } ;
8
8
use bitcoin:: blockdata:: script:: Script ;
9
+ use bitcoin:: blockdata:: transaction:: OutPoint as BitcoinOutPoint ;
9
10
use bitcoin:: network:: constants:: Network ;
10
11
use bitcoin:: network:: serialize:: { deserialize, serialize, BitcoinHash } ;
11
12
use bitcoin:: util:: hash:: Sha256dHash ;
@@ -22,6 +23,7 @@ use lightning::util::events::{EventsProvider,Event};
22
23
use lightning:: util:: reset_rng_state;
23
24
use lightning:: util:: logger:: Logger ;
24
25
use lightning:: util:: sha2:: Sha256 ;
26
+ use lightning:: ln:: keysinterface:: KeysInterface ;
25
27
26
28
mod utils;
27
29
@@ -104,6 +106,11 @@ impl BroadcasterInterface for TestBroadcaster {
104
106
fn broadcast_transaction ( & self , _tx : & Transaction ) { }
105
107
}
106
108
109
+ struct TestKeysManager { }
110
+ impl KeysInterface for TestKeysManager {
111
+ fn register_spendable_outputs ( & self , _spendable_outputs : Vec < ( Option < SecretKey > , Script , BitcoinOutPoint ) > ) { }
112
+ }
113
+
107
114
#[ derive( Clone ) ]
108
115
struct Peer < ' a > {
109
116
id : u8 ,
@@ -234,7 +241,8 @@ pub fn do_test(data: &[u8], logger: &Arc<Logger>) {
234
241
235
242
let watch = Arc :: new ( ChainWatchInterfaceUtil :: new ( Network :: Bitcoin , Arc :: clone ( & logger) ) ) ;
236
243
let broadcast = Arc :: new ( TestBroadcaster { } ) ;
237
- let monitor = channelmonitor:: SimpleManyChannelMonitor :: new ( watch. clone ( ) , broadcast. clone ( ) ) ;
244
+ let keys_manager = Arc :: new ( TestKeysManager { } ) ;
245
+ let monitor = channelmonitor:: SimpleManyChannelMonitor :: new ( watch. clone ( ) , broadcast. clone ( ) , keys_manager. clone ( ) ) ;
238
246
239
247
let channelmanager = ChannelManager :: new ( our_network_key, slice_to_be32 ( get_slice ! ( 4 ) ) , get_slice ! ( 1 ) [ 0 ] != 0 , Network :: Bitcoin , fee_est. clone ( ) , monitor. clone ( ) , watch. clone ( ) , broadcast. clone ( ) , Arc :: clone ( & logger) ) . unwrap ( ) ;
240
248
let router = Arc :: new ( Router :: new ( PublicKey :: from_secret_key ( & secp_ctx, & our_network_key) , watch. clone ( ) , Arc :: clone ( & logger) ) ) ;
0 commit comments