fix: improve more docs and more refactoring
Thank you @vladimirfomene for these suggestions. * Rename `LocalUpdate::keychain` to `LocalUpdate::last_active_indices`. * Change docs for `CheckPoint` to be more descriptive. * Fix incorrect logic in `update_local_chain` for `EsploraExt` and `EsploraAsyncExt`.
This commit is contained in:
@@ -278,7 +278,9 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
let indexed_additions = {
|
||||
let mut additions = IndexedAdditions::<ConfirmationHeightAnchor, _>::default();
|
||||
let (_, index_additions) = graph.index.reveal_to_target_multi(&final_update.keychain);
|
||||
let (_, index_additions) = graph
|
||||
.index
|
||||
.reveal_to_target_multi(&final_update.last_active_indices);
|
||||
additions.append(IndexedAdditions {
|
||||
index_additions,
|
||||
..Default::default()
|
||||
|
||||
@@ -59,7 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let get_heights = wallet.tx_graph().missing_blocks(wallet.local_chain());
|
||||
let chain_update = client.update_local_chain(prev_tip, get_heights)?;
|
||||
let update = LocalUpdate {
|
||||
keychain: last_active_indices,
|
||||
last_active_indices,
|
||||
graph: update_graph,
|
||||
..LocalUpdate::new(chain_update)
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let get_heights = wallet.tx_graph().missing_blocks(wallet.local_chain());
|
||||
let chain_update = client.update_local_chain(prev_tip, get_heights).await?;
|
||||
let update = LocalUpdate {
|
||||
keychain: last_active_indices,
|
||||
last_active_indices,
|
||||
graph: update_graph,
|
||||
..LocalUpdate::new(chain_update)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user