Skip to content

Commit 6bc46cc

Browse files
f add comment about future queue-based system
1 parent e067262 commit 6bc46cc

File tree

1 file changed

+4
-0
lines changed
  • lightning-data-persister/src

1 file changed

+4
-0
lines changed

lightning-data-persister/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ impl<ChanSigner: ChannelKeys + Readable + Writeable> FilesystemPersister<ChanSig
3838
path_buf.to_str().unwrap().to_string()
3939
}
4040

41+
// Utility to write a file to disk.
42+
// Note: we may eventually want to change this model to a queue-based system, such that
43+
// writes are queued to a separate writer thread. This would improve performance
44+
// since syncing to disk can sometimes take 100s of milliseconds.
4145
fn write_channel_data(&self, funding_txo: OutPoint, monitor: &ChannelMonitor<ChanSigner>) -> std::io::Result<()> {
4246
// Do a crazy dance with lots of fsync()s to be overly cautious here...
4347
// We never want to end up in a state where we've lost the old data, or end up using the

0 commit comments

Comments
 (0)