Merge #1311: electrum: reduce load on server

4567e3280c2a3238249ae7f7d2ce862aa8493a98 electrum: reduce load on server (Michael Mallan)

Pull request description:

  Changing values as discussed in #1292.

ACKs for top commit:
  darosior:
    utACK 4567e3280c2a3238249ae7f7d2ce862aa8493a98

Tree-SHA512: 71fca18026d3e6bca95fda82f0018b1073ac2a122ffa08294ff01d335fb34a348039e5aaab95de15c359ebd8e38ddfda07ba895e0e0e2550c6a2ec0531847135
This commit is contained in:
Antoine Poinsot 2024-09-10 15:44:59 +02:00
commit c23709bc06
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304
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
// 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 STOP_GAP: usize = 50;
const STOP_GAP: usize = 200;
let (chain_update, mut graph_update, keychain_update) = if !self.is_rescanning() {
log::info!("Performing sync.");

View File

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