Skip to content

Commit

Permalink
Merge pull request #148 from ralexstokes/boost/bid-open-log
Browse files Browse the repository at this point in the history
boost: log which relays serve the best bid
  • Loading branch information
ralexstokes authored Oct 3, 2023
2 parents e225325 + 25dcdd9 commit 4849523
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mev-boost-rs/src/relay_mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use mev_rs::{
use parking_lot::Mutex;
use rand::prelude::*;
use std::{cmp::Ordering, collections::HashMap, ops::Deref, sync::Arc, time::Duration};
use tracing::warn;
use tracing::{info, warn};

// See note in the `mev-relay-rs::Relay` about this constant.
// TODO likely drop this feature...
Expand Down Expand Up @@ -189,6 +189,13 @@ impl BlindedBlockProvider for RelayMux {
}
}

let relays_desc = best_relays
.iter()
.map(|relay| format!("{relay}"))
.reduce(|desc, next| format!("{desc}, {next}"))
.expect("at least one relay");
info!(slot = bid_request.slot, block_hash = %best_block_hash, relays=relays_desc, "acquired best bid");

{
let mut state = self.state.lock();
// assume the next request to open a bid corresponds to the current request
Expand Down

0 comments on commit 4849523

Please sign in to comment.