Skip to content

Commit f843716

Browse files
committed
upgrade to 1.91.1
1 parent b8ecfd1 commit f843716

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

crates/boundless-cli/src/commands/prover/generate_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ impl ProverGenerateConfig {
931931
prices_per_mcycle.sort_by(|a, b| a.partial_cmp(b).unwrap_or(std::cmp::Ordering::Equal));
932932

933933
// Calculate median (50th percentile)
934-
let median_price = if prices_per_mcycle.len() % 2 == 0 {
934+
let median_price = if prices_per_mcycle.len().is_multiple_of(2) {
935935
let mid = prices_per_mcycle.len() / 2;
936936
(prices_per_mcycle[mid - 1] + prices_per_mcycle[mid]) / 2.0
937937
} else {

crates/broker/src/config.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -166,25 +166,20 @@ mod defaults {
166166
}
167167

168168
/// Order pricing priority mode for determining which orders to price first
169-
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
169+
#[derive(Default, Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
170170
#[serde(rename_all = "snake_case")]
171171
pub enum OrderPricingPriority {
172172
/// Process orders in random order to distribute competition among provers
173+
#[default]
173174
Random,
174175
/// Process orders in the order they were observed (FIFO)
175176
ObservationTime,
176177
/// Process orders by shortest expiry first (earliest deadline)
177178
ShortestExpiry,
178179
}
179180

180-
impl Default for OrderPricingPriority {
181-
fn default() -> Self {
182-
Self::Random
183-
}
184-
}
185-
186181
/// Order commitment priority mode for determining which orders to commit to first
187-
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
182+
#[derive(Default, Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
188183
#[serde(rename_all = "snake_case")]
189184
pub enum OrderCommitmentPriority {
190185
/// Process orders in random order to distribute competition among provers
@@ -194,15 +189,10 @@ pub enum OrderCommitmentPriority {
194189
/// Process lock-and-fulfill orders by highest ETH payment, then fulfill-after-lock-expire random weighted by collateral reward
195190
Price,
196191
/// Process lock-and-fulfill orders by highest ETH price per cycle, then fulfill-after-lock-expire random weighted by collateral reward
192+
#[default]
197193
CyclePrice,
198194
}
199195

200-
impl Default for OrderCommitmentPriority {
201-
fn default() -> Self {
202-
Self::CyclePrice
203-
}
204-
}
205-
206196
/// All configuration related to markets mechanics
207197
#[derive(Debug, Deserialize, Serialize)]
208198
#[non_exhaustive]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.90"
2+
channel = "1.91.1"
33
components = ["clippy", "rustfmt", "rust-src"]
44
profile = "minimal"

0 commit comments

Comments
 (0)