From 0aa558ef6ab4a386c33a35aa978c0520650b49fd Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Wed, 10 Jan 2024 16:51:38 +0800 Subject: [PATCH] test(electrum): added scan and reorg tests Added scan and reorg tests to check electrum functionality using `TestEnv`. --- crates/electrum/tests/test_electrum.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/crates/electrum/tests/test_electrum.rs b/crates/electrum/tests/test_electrum.rs index 7d18526e92..7b6d945c23 100644 --- a/crates/electrum/tests/test_electrum.rs +++ b/crates/electrum/tests/test_electrum.rs @@ -85,7 +85,7 @@ fn scan_detects_confirmed_tx() -> Result<()> { let ElectrumUpdate { chain_update, relevant_txids, - } = client.scan_without_keychain(recv_chain.tip(), [spk_to_track], None, None, 5)?; + } = client.sync(recv_chain.tip(), [spk_to_track], None, None, 5)?; let missing = relevant_txids.missing_full_txs(recv_graph.graph()); let graph_update = relevant_txids.into_confirmation_time_tx_graph(&client, None, missing)?; @@ -183,7 +183,7 @@ fn tx_can_become_unconfirmed_after_reorg() -> Result<()> { let ElectrumUpdate { chain_update, relevant_txids, - } = client.scan_without_keychain(recv_chain.tip(), [spk_to_track.clone()], None, None, 5)?; + } = client.sync(recv_chain.tip(), [spk_to_track.clone()], None, None, 5)?; let missing = relevant_txids.missing_full_txs(recv_graph.graph()); let graph_update = relevant_txids.into_confirmation_time_tx_graph(&client, None, missing)?; @@ -208,13 +208,7 @@ fn tx_can_become_unconfirmed_after_reorg() -> Result<()> { let ElectrumUpdate { chain_update, relevant_txids, - } = client.scan_without_keychain( - recv_chain.tip(), - [spk_to_track.clone()], - None, - None, - 5, - )?; + } = client.sync(recv_chain.tip(), [spk_to_track.clone()], None, None, 5)?; let missing = relevant_txids.missing_full_txs(recv_graph.graph()); let graph_update =