Skip to content

Commit

Permalink
Reduce MAX_ORPHAN_SIZE to 60
Browse files Browse the repository at this point in the history
- Because we are not looping through OrphanBlockPool recursively any longer, reducing this constant speeds up our sync
- And locks OprhanBlockPool RwLock for a lesser time period
  • Loading branch information
who-biz committed Nov 7, 2023
1 parent 059f30c commit a8e3309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use std::sync::Arc;
use std::time::{Duration, Instant};

/// Orphan pool size is limited by MAX_ORPHAN_SIZE
pub const MAX_ORPHAN_SIZE: usize = 200;
pub const MAX_ORPHAN_SIZE: usize = 60;

/// When evicting, very old orphans are evicted first
const MAX_ORPHAN_AGE_SECS: u64 = 300;
Expand Down

0 comments on commit a8e3309

Please sign in to comment.