Skip to content

Commit

Permalink
test(electrum): added scan and reorg tests
Browse files Browse the repository at this point in the history
Added scan and reorg tests to check electrum functionality using
`TestEnv`.
  • Loading branch information
LagginTimes committed Jan 15, 2024
1 parent f4aa613 commit 50a19f7
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions crates/electrum/tests/test_electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -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)?;
Expand All @@ -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 =
Expand Down

0 comments on commit 50a19f7

Please sign in to comment.