Skip to content

Commit 8df5719

Browse files
committed
f Expect constant number of blocks after pre-mining
1 parent a526260 commit 8df5719

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lightning-transaction-sync/tests/integration_tests.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,10 @@ fn test_esplora_syncs() {
167167
let confirmable = TestConfirmable::new();
168168

169169
// Check we pick up on new best blocks
170-
let expected_height = 0u32;
171-
assert_eq!(confirmable.best_block.lock().unwrap().1, expected_height);
170+
assert_eq!(confirmable.best_block.lock().unwrap().1, 0);
172171

173172
tx_sync.sync(vec![&confirmable]).unwrap();
174-
175-
let expected_height = bitcoind.client.get_block_count().unwrap() as u32;
176-
assert_eq!(confirmable.best_block.lock().unwrap().1, expected_height);
173+
assert_eq!(confirmable.best_block.lock().unwrap().1, 102);
177174

178175
let events = std::mem::take(&mut *confirmable.events.lock().unwrap());
179176
assert_eq!(events.len(), 1);
@@ -253,13 +250,10 @@ async fn test_esplora_syncs() {
253250
let confirmable = TestConfirmable::new();
254251

255252
// Check we pick up on new best blocks
256-
let expected_height = 0u32;
257-
assert_eq!(confirmable.best_block.lock().unwrap().1, expected_height);
253+
assert_eq!(confirmable.best_block.lock().unwrap().1, 0);
258254

259255
tx_sync.sync(vec![&confirmable]).await.unwrap();
260-
261-
let expected_height = bitcoind.client.get_block_count().unwrap() as u32;
262-
assert_eq!(confirmable.best_block.lock().unwrap().1, expected_height);
256+
assert_eq!(confirmable.best_block.lock().unwrap().1, 102);
263257

264258
let events = std::mem::take(&mut *confirmable.events.lock().unwrap());
265259
assert_eq!(events.len(), 1);

0 commit comments

Comments
 (0)