File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2312,6 +2312,21 @@ impl<D> Wallet<D> {
23122312 pub fn local_chain ( & self ) -> & LocalChain {
23132313 & self . chain
23142314 }
2315+
2316+ /// Set lookahead for all keychains.
2317+ ///
2318+ /// Passing a lookahead of 0 will result in an error. This is because if we sync
2319+ /// the chain with a lookahead of 0, we would not find any update since we don't
2320+ /// have any scripts stored.
2321+ pub fn set_lookahead_for_all ( & mut self , lookahead : u32 ) -> Result < ( ) , Error > {
2322+ if lookahead == 0 {
2323+ return Err ( Error :: Generic (
2324+ "lookahead must be greater than 0" . to_string ( ) ,
2325+ ) ) ;
2326+ }
2327+ self . indexed_graph . index . set_lookahead_for_all ( lookahead) ;
2328+ Ok ( ( ) )
2329+ }
23152330}
23162331
23172332impl < D > AsRef < bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeHeightAnchor > > for Wallet < D > {
You can’t perform that action at this time.
0 commit comments