Skip to content

Commit

Permalink
update to mempool changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Jun 2, 2021
1 parent 45ef97b commit c322889
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jormungandr/src/fragment/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Logs {
// state transition.
let mut entry =
FragmentLog::new(fragment_id.clone().into_hash(), FragmentOrigin::Network);
entry.modify(status);
entry.modify(status.clone());
self.entries.put(fragment_id, entry);

// TODO: not sure about this, this could be outside the branches also, but that
Expand Down
8 changes: 6 additions & 2 deletions jormungandr/src/fragment/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct Process {
pool_max_entries: usize,
logs_max_entries: usize,
network_msg_box: MessageBox<NetworkMsg>,
notifier_msg_box: MessageBox<NotifierMsg>,
}

#[derive(Debug, Error)]
Expand All @@ -41,11 +42,11 @@ impl Process {
network_msg_box: MessageBox<NetworkMsg>,
notifier_msg_box: MessageBox<NotifierMsg>,
) -> Self {
let logs = Logs::new(logs_max_entries, notifier_msg_box);
Process {
pool_max_entries,
logs_max_entries,
network_msg_box,
notifier_msg_box,
}
}

Expand Down Expand Up @@ -91,7 +92,10 @@ impl Process {
"Having 'log_max_entries' < 'pool_max_entries' * n_pools is not recommendend. Overriding 'log_max_entries' to {}", min_logs_size
);
}
let logs = Logs::new(std::cmp::max(self.logs_max_entries, min_logs_size));
let logs = Logs::new(
std::cmp::max(self.logs_max_entries, min_logs_size),
self.notifier_msg_box.clone(),
);

let mut wakeup = Box::pin(hourly_wakeup(persistent_log_dir.is_some()));

Expand Down

0 comments on commit c322889

Please sign in to comment.