electrum: reduce load on server

This commit is contained in:
Michael Mallan 2024-09-10 13:17:04 +01:00
parent 26923f6aad
commit 4567e3280c
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB
2 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@ impl Electrum {
// We'll only need to calculate fees of mempool transactions and this will be done separately from our graph // We'll only need to calculate fees of mempool transactions and this will be done separately from our graph
// so we don't need to fetch prev txouts. In any case, we'll already have these for our own transactions. // so we don't need to fetch prev txouts. In any case, we'll already have these for our own transactions.
const FETCH_PREV_TXOUTS: bool = false; const FETCH_PREV_TXOUTS: bool = false;
const STOP_GAP: usize = 50; const STOP_GAP: usize = 200;
let (chain_update, mut graph_update, keychain_update) = if !self.is_rescanning() { let (chain_update, mut graph_update, keychain_update) = if !self.is_rescanning() {
log::info!("Performing sync."); log::info!("Performing sync.");

View File

@ -22,8 +22,8 @@ use crate::{
descriptors::LianaDescriptor, descriptors::LianaDescriptor,
}; };
// TODO: Move and reuse `liana::database::sqlite::utils::LOOK_AHEAD_LIMIT`? // We don't want to overload the server (each SPK is separate call).
const LOOK_AHEAD_LIMIT: u32 = 200; const LOOK_AHEAD_LIMIT: u32 = 30;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum KeychainType { pub enum KeychainType {