Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit e602f2c

Browse files
committed
Add TODOs
1 parent 6826a81 commit e602f2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

substrate/network-libp2p/src/topology.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl NetTopology {
101101
};
102102

103103
let file = fs::File::create(path)?;
104+
// TODO: the capacity of the BufWriter is kind of arbitrary ; decide better
104105
serialize(BufWriter::with_capacity(1024 * 1024, file), &self.store)
105106
}
106107

@@ -497,6 +498,7 @@ fn try_load(path: impl AsRef<Path>) -> FnvHashMap<PeerId, PeerInfo> {
497498
}
498499

499500
let mut file = match fs::File::open(path) {
501+
// TODO: the capacity of the BufReader is kind of arbitrary ; decide better
500502
Ok(f) => BufReader::with_capacity(1024 * 1024, f),
501503
Err(err) => {
502504
warn!(target: "sub-libp2p", "Failed to open peer storage file: {:?}", err);

0 commit comments

Comments
 (0)