Skip to content

Commit

Permalink
Merge pull request #158 from ralexstokes/update-log
Browse files Browse the repository at this point in the history
clean up per-epoch logging
  • Loading branch information
ralexstokes authored Oct 19, 2023
2 parents 1285bd9 + c6dfea5 commit fd883db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mev-boost-rs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ impl Service {

let relay_mux_clone = relay_mux.clone();
let relay_task = tokio::spawn(async move {
let relay_mux = relay_mux_clone;
let slots = clock.stream_slots();

tokio::pin!(slots);

let mut current_epoch = clock.current_epoch().expect("after genesis");
relay_mux_clone.on_epoch(current_epoch);
while let Some(slot) = slots.next().await {
relay_mux_clone.on_slot(slot);
relay_mux.on_slot(slot);

let epoch = clock.current_epoch().expect("after genesis");
let epoch = clock.epoch_for(slot);
if epoch != current_epoch {
relay_mux_clone.on_epoch(epoch);
relay_mux.on_epoch(epoch);
current_epoch = epoch;
}
}
Expand Down

0 comments on commit fd883db

Please sign in to comment.