@@ -40,47 +40,33 @@ mod tests {
4040
4141 #[ async_trait:: async_trait]
4242 impl key_wallet_manager:: wallet_interface:: WalletInterface for MockWallet {
43- async fn process_block (
44- & mut self ,
45- block : & Block ,
46- height : u32 ,
47- _network : Network ,
48- ) -> Vec < dashcore:: Txid > {
43+ async fn process_block ( & mut self , block : & Block , height : u32 ) -> Vec < dashcore:: Txid > {
4944 let mut processed = self . processed_blocks . lock ( ) . await ;
5045 processed. push ( ( block. block_hash ( ) , height) ) ;
5146
5247 // Return txids of all transactions in block as "relevant"
5348 block. txdata . iter ( ) . map ( |tx| tx. txid ( ) ) . collect ( )
5449 }
5550
56- async fn process_mempool_transaction ( & mut self , tx : & Transaction , _network : Network ) {
51+ async fn process_mempool_transaction ( & mut self , tx : & Transaction ) {
5752 let mut processed = self . processed_transactions . lock ( ) . await ;
5853 processed. push ( tx. txid ( ) ) ;
5954 }
6055
61- async fn handle_reorg ( & mut self , _from_height : u32 , _to_height : u32 , _network : Network ) {
62- // Not tested here
63- }
64-
6556 async fn check_compact_filter (
6657 & mut self ,
6758 _filter : & dashcore:: bip158:: BlockFilter ,
6859 _block_hash : & dashcore:: BlockHash ,
69- _network : Network ,
7060 ) -> bool {
7161 // Return true for all filters in test
7262 true
7363 }
7464
75- async fn describe ( & self , _network : Network ) -> String {
65+ async fn describe ( & self ) -> String {
7666 "MockWallet (test implementation)" . to_string ( )
7767 }
7868
79- async fn transaction_effect (
80- & self ,
81- tx : & Transaction ,
82- _network : Network ,
83- ) -> Option < ( i64 , Vec < String > ) > {
69+ async fn transaction_effect ( & self , tx : & Transaction ) -> Option < ( i64 , Vec < String > ) > {
8470 let map = self . effects . lock ( ) . await ;
8571 map. get ( & tx. txid ( ) ) . cloned ( )
8672 }
@@ -104,14 +90,8 @@ mod tests {
10490 let storage = Arc :: new ( Mutex :: new (
10591 DiskStorageManager :: with_temp_dir ( ) . await . expect ( "Failed to create tmp storage" ) ,
10692 ) ) ;
107- let processor = BlockProcessor :: new (
108- task_rx,
109- wallet. clone ( ) ,
110- storage. clone ( ) ,
111- stats,
112- event_tx,
113- Network :: Dash ,
114- ) ;
93+ let processor =
94+ BlockProcessor :: new ( task_rx, wallet. clone ( ) , storage. clone ( ) , stats, event_tx) ;
11595
11696 ( processor, task_tx, event_rx, wallet, storage)
11797 }
@@ -268,36 +248,22 @@ mod tests {
268248
269249 #[ async_trait:: async_trait]
270250 impl key_wallet_manager:: wallet_interface:: WalletInterface for NonMatchingWallet {
271- async fn process_block (
272- & mut self ,
273- _block : & Block ,
274- _height : u32 ,
275- _network : Network ,
276- ) -> Vec < dashcore:: Txid > {
251+ async fn process_block ( & mut self , _block : & Block , _height : u32 ) -> Vec < dashcore:: Txid > {
277252 Vec :: new ( )
278253 }
279254
280- async fn process_mempool_transaction ( & mut self , _tx : & Transaction , _network : Network ) { }
281-
282- async fn handle_reorg (
283- & mut self ,
284- _from_height : u32 ,
285- _to_height : u32 ,
286- _network : Network ,
287- ) {
288- }
255+ async fn process_mempool_transaction ( & mut self , _tx : & Transaction ) { }
289256
290257 async fn check_compact_filter (
291258 & mut self ,
292259 _filter : & dashcore:: bip158:: BlockFilter ,
293260 _block_hash : & dashcore:: BlockHash ,
294- _network : Network ,
295261 ) -> bool {
296262 // Always return false - filter doesn't match
297263 false
298264 }
299265
300- async fn describe ( & self , _network : Network ) -> String {
266+ async fn describe ( & self ) -> String {
301267 "NonMatchingWallet (test implementation)" . to_string ( )
302268 }
303269 }
@@ -310,8 +276,7 @@ mod tests {
310276 DiskStorageManager :: with_temp_dir ( ) . await . expect ( "Failed to create tmp storage" ) ,
311277 ) ) ;
312278
313- let processor =
314- BlockProcessor :: new ( task_rx, wallet, storage, stats, event_tx, Network :: Dash ) ;
279+ let processor = BlockProcessor :: new ( task_rx, wallet, storage, stats, event_tx) ;
315280
316281 let block_hash = create_test_block ( Network :: Dash ) . block_hash ( ) ;
317282 let filter_data = vec ! [ 1 , 2 , 3 , 4 , 5 ] ;
0 commit comments