Skip to content

Commit

Permalink
periodic debug during txhashset download
Browse files Browse the repository at this point in the history
  • Loading branch information
antiochp committed Jul 9, 2019
1 parent 4ca009d commit e99573b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
19 changes: 4 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ impl MessageHandler for Protocol {
download_start_time.timestamp(),
nonce
));
let mut now = Instant::now();
let mut save_txhashset_to_file = |file| -> Result<(), Error> {
let mut tmp_zip =
BufWriter::new(OpenOptions::new().write(true).create_new(true).open(file)?);
let total_size = sm_arch.bytes as usize;
let mut downloaded_size: usize = 0;
let mut request_size = cmp::min(48_000, total_size);
let mut now = Instant::now();
while request_size > 0 {
let size = msg.copy_attachment(request_size, &mut tmp_zip)?;
downloaded_size += size;
Expand Down

0 comments on commit e99573b

Please sign in to comment.