-
Notifications
You must be signed in to change notification settings - Fork 159
Derive shutdown scripts without blocking on wallet persistence #1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
273e4d0
1b27621
338dc8f
6ed64e8
075a40c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,8 +27,8 @@ use lightning_transaction_sync::ElectrumSyncClient; | |
|
|
||
| use super::WalletSyncStatus; | ||
| use crate::config::{ | ||
| clamp_full_scan_stop_gap, Config, ElectrumSyncConfig, MAX_FULL_SCAN_STOP_GAP, | ||
| MIN_FULL_SCAN_STOP_GAP, | ||
| clamp_full_scan_stop_gap, Config, ElectrumSyncConfig, ADDRESS_POOL_SIZE, | ||
| MAX_FULL_SCAN_STOP_GAP, MIN_FULL_SCAN_STOP_GAP, | ||
| }; | ||
| use crate::error::Error; | ||
| use crate::fee_estimator::{ | ||
|
|
@@ -598,7 +598,10 @@ impl ElectrumRuntimeClient { | |
| bounded | ||
| ); | ||
| } | ||
| bounded as usize | ||
| // Extend the gap by the address pool size: the pool keeps that many addresses standing | ||
| // revealed-but-unused, which a scan restoring the wallet from seed alone would otherwise | ||
| // count against the configured gap. | ||
| (bounded as usize).saturating_add(ADDRESS_POOL_SIZE as usize) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think with the FIFO design this (and below) is no longer needed. If we'd want to account for the address pool size it should just be considered the minimum in |
||
| } | ||
|
|
||
| async fn get_incremental_sync_wallet_update( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to parallelize the reads on startup.
IMO it would also preferable to keep up the pre-existing patterns of doing the
read_methods here in parallel, and then hand that in to initialize via anAddressPool::newor so rather than doing all/obfuscating in aninitialize_method.