@@ -109,9 +109,9 @@ where
109
109
110
110
#[ derive( Debug ) ]
111
111
enum TestConfirmableEvent {
112
- Confirmed ( Txid , BlockHash , u32 ) ,
112
+ Confirmed ( Txid ) ,
113
113
Unconfirmed ( Txid ) ,
114
- BestBlockUpdated ( BlockHash , u32 ) ,
114
+ BestBlockUpdated ,
115
115
}
116
116
117
117
struct TestConfirmable {
@@ -140,7 +140,7 @@ impl Confirm for TestConfirmable {
140
140
let block_hash = header. block_hash ( ) ;
141
141
self . confirmed_txs . lock ( ) . unwrap ( ) . insert ( txid, ( block_hash, height) ) ;
142
142
self . unconfirmed_txs . lock ( ) . unwrap ( ) . remove ( & txid) ;
143
- let event = TestConfirmableEvent :: Confirmed ( txid, block_hash , height ) ;
143
+ let event = TestConfirmableEvent :: Confirmed ( txid) ;
144
144
self . events . lock ( ) . unwrap ( ) . push ( event) ;
145
145
}
146
146
}
@@ -154,7 +154,7 @@ impl Confirm for TestConfirmable {
154
154
fn best_block_updated ( & self , header : & Header , height : u32 ) {
155
155
let block_hash = header. block_hash ( ) ;
156
156
* self . best_block . lock ( ) . unwrap ( ) = ( block_hash, height) ;
157
- let event = TestConfirmableEvent :: BestBlockUpdated ( block_hash , height ) ;
157
+ let event = TestConfirmableEvent :: BestBlockUpdated ;
158
158
self . events . lock ( ) . unwrap ( ) . push ( event) ;
159
159
}
160
160
@@ -281,20 +281,20 @@ macro_rules! test_syncing {
281
281
}
282
282
283
283
match events[ 2 ] {
284
- TestConfirmableEvent :: BestBlockUpdated ( .. ) => { } ,
284
+ TestConfirmableEvent :: BestBlockUpdated => { } ,
285
285
_ => panic!( "Unexpected event" ) ,
286
286
}
287
287
288
288
match events[ 3 ] {
289
- TestConfirmableEvent :: Confirmed ( t, _ , _ ) => {
289
+ TestConfirmableEvent :: Confirmed ( t) => {
290
290
assert!( t == txid || t == second_txid) ;
291
291
assert!( seen_txids. remove( & t) ) ;
292
292
} ,
293
293
_ => panic!( "Unexpected event" ) ,
294
294
}
295
295
296
296
match events[ 4 ] {
297
- TestConfirmableEvent :: Confirmed ( t, _ , _ ) => {
297
+ TestConfirmableEvent :: Confirmed ( t) => {
298
298
assert!( t == txid || t == second_txid) ;
299
299
assert!( seen_txids. remove( & t) ) ;
300
300
} ,
0 commit comments