Skip to content

Commit 04836c6

Browse files
committed
Drop unused fields from lightning-transaction-sync test utils
1 parent 636db61 commit 04836c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lightning-transaction-sync/tests/integration_tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ where
109109

110110
#[derive(Debug)]
111111
enum TestConfirmableEvent {
112-
Confirmed(Txid, BlockHash, u32),
112+
Confirmed(Txid),
113113
Unconfirmed(Txid),
114-
BestBlockUpdated(BlockHash, u32),
114+
BestBlockUpdated,
115115
}
116116

117117
struct TestConfirmable {
@@ -140,7 +140,7 @@ impl Confirm for TestConfirmable {
140140
let block_hash = header.block_hash();
141141
self.confirmed_txs.lock().unwrap().insert(txid, (block_hash, height));
142142
self.unconfirmed_txs.lock().unwrap().remove(&txid);
143-
let event = TestConfirmableEvent::Confirmed(txid, block_hash, height);
143+
let event = TestConfirmableEvent::Confirmed(txid);
144144
self.events.lock().unwrap().push(event);
145145
}
146146
}
@@ -154,7 +154,7 @@ impl Confirm for TestConfirmable {
154154
fn best_block_updated(&self, header: &Header, height: u32) {
155155
let block_hash = header.block_hash();
156156
*self.best_block.lock().unwrap() = (block_hash, height);
157-
let event = TestConfirmableEvent::BestBlockUpdated(block_hash, height);
157+
let event = TestConfirmableEvent::BestBlockUpdated;
158158
self.events.lock().unwrap().push(event);
159159
}
160160

@@ -281,20 +281,20 @@ macro_rules! test_syncing {
281281
}
282282

283283
match events[2] {
284-
TestConfirmableEvent::BestBlockUpdated(..) => {},
284+
TestConfirmableEvent::BestBlockUpdated => {},
285285
_ => panic!("Unexpected event"),
286286
}
287287

288288
match events[3] {
289-
TestConfirmableEvent::Confirmed(t, _, _) => {
289+
TestConfirmableEvent::Confirmed(t) => {
290290
assert!(t == txid || t == second_txid);
291291
assert!(seen_txids.remove(&t));
292292
},
293293
_ => panic!("Unexpected event"),
294294
}
295295

296296
match events[4] {
297-
TestConfirmableEvent::Confirmed(t, _, _) => {
297+
TestConfirmableEvent::Confirmed(t) => {
298298
assert!(t == txid || t == second_txid);
299299
assert!(seen_txids.remove(&t));
300300
},

0 commit comments

Comments
 (0)