Skip to content

Commit 41c5253

Browse files
committed
change threshold value
changes the threshold value to 8192 bytes as suggested in the PR comments
1 parent b313e39 commit 41c5253

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/util/persist.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ where
500500
/// - [`MonitorUpdatingPersister`] will potentially have more listing to do if you need to run
501501
/// [`MonitorUpdatingPersister::cleanup_stale_updates`].
502502
///
503-
/// This sets `min_monitor_size_for_updates_bytes` to 4096 bytes (4 KiB), which is a reasonable
503+
/// This sets `min_monitor_size_for_updates_bytes` to 8192 bytes (4 KiB), which is a reasonable
504504
/// default for most use cases. Monitors smaller than this will be persisted in full rather than
505505
/// using update-based persistence. Use [`MonitorUpdatingPersister::new_with_monitor_size_threshold`]
506506
/// if you need a custom threshold.
@@ -512,7 +512,7 @@ where
512512
kv_store,
513513
logger,
514514
maximum_pending_updates,
515-
4096,
515+
8192,
516516
entropy_source,
517517
signer_provider,
518518
broadcaster,
@@ -1424,7 +1424,7 @@ mod tests {
14241424
let store_1 = TestStore::new(false);
14251425
let logger_1 = TestLogger::new();
14261426

1427-
// Test the default new() constructor (uses 4096 byte threshold)
1427+
// Test the default new() constructor (uses 8192 byte threshold)
14281428
let persister_0 = MonitorUpdatingPersister::new(
14291429
&store_0,
14301430
&logger_0,
@@ -1447,7 +1447,7 @@ mod tests {
14471447
);
14481448

14491449
// Verify the constructors set the thresholds correctly
1450-
assert_eq!(persister_0.min_monitor_size_for_updates_bytes, 4096);
1450+
assert_eq!(persister_0.min_monitor_size_for_updates_bytes, 8192);
14511451
assert_eq!(persister_1.min_monitor_size_for_updates_bytes, 0);
14521452
let mut node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
14531453
let chain_mon_0 = test_utils::TestChainMonitor::new(

0 commit comments

Comments
 (0)