fix: TxGraph::missing_blocks logic

Added additional tests for unnecessary duplicate heights
This commit is contained in:
志宇
2023-07-22 22:41:33 +08:00
parent db15e03bdc
commit bea8e5aff4
5 changed files with 191 additions and 16 deletions

View File

@@ -56,7 +56,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let (update_graph, last_active_indices) =
client.update_tx_graph(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)?;
let get_heights = wallet.tx_graph().missing_blocks(wallet.local_chain());
let get_heights = wallet.tx_graph().missing_heights(wallet.local_chain());
let chain_update = client.update_local_chain(prev_tip, get_heights)?;
let update = LocalUpdate {
last_active_indices,

View File

@@ -57,7 +57,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let (update_graph, last_active_indices) = client
.update_tx_graph(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)
.await?;
let get_heights = wallet.tx_graph().missing_blocks(wallet.local_chain());
let get_heights = wallet.tx_graph().missing_heights(wallet.local_chain());
let chain_update = client.update_local_chain(prev_tip, get_heights).await?;
let update = LocalUpdate {
last_active_indices,