Skip to content

Commit 298f702

Browse files
committed
Instrument gas price simulation
1 parent 5090dc1 commit 298f702

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/driver/src/domain/competition/solution/settlement.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl Settlement {
124124
}
125125

126126
/// Create a new settlement and ensure that it is valid.
127+
#[instrument(name = "create_settlement", skip_all)]
127128
async fn new(
128129
auction_id: auction::Id,
129130
solution: Solution,

crates/driver/src/infra/blockchain/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use {
1313
},
1414
std::{fmt, sync::Arc, time::Duration},
1515
thiserror::Error,
16+
tracing::{Level, instrument},
1617
url::Url,
1718
web3::{Transport, types::CallRequest},
1819
};
@@ -174,6 +175,7 @@ impl Ethereum {
174175
}
175176

176177
/// Create access list used by a transaction.
178+
#[instrument(skip_all)]
177179
pub async fn create_access_list<T>(&self, tx: T) -> Result<eth::AccessList, Error>
178180
where
179181
CallRequest: From<T>,
@@ -272,6 +274,7 @@ impl Ethereum {
272274
.map_err(Into::into)
273275
}
274276

277+
#[instrument(skip(self), ret(level = Level::DEBUG))]
275278
pub(super) async fn simulation_gas_price(&self) -> Option<eth::U256> {
276279
// Some nodes don't pick a reasonable default value when you don't specify a gas
277280
// price and default to 0. Additionally some sneaky tokens have special code

0 commit comments

Comments
 (0)