Skip to content

Commit 739f727

Browse files
committed
fix lints
1 parent b7fef53 commit 739f727

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/chain/store/base_fee.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ use fvm_ipld_blockstore::Blockstore;
1010

1111
use super::weighted_quick_select::weighted_quick_select;
1212

13-
/// TODO(FIP-0115): Replace this placeholder with actual next upgrade height
14-
/// This is a temporary value used during the FIP-0115 implementation.
15-
/// Replace with the actual next upgrade height once it is determined and finalized.
13+
/// Placeholder for the FIP-0115 activation height.
14+
/// Replace with the actual network upgrade height once finalized.
1615
pub const PLACEHOLDER_NEXT_UPGRADE_HEIGHT: ChainEpoch = ChainEpoch::MAX;
1716

1817
pub const BLOCK_GAS_TARGET_INDEX: u64 = BLOCK_GAS_LIMIT * 80 / 100 - 1;
@@ -99,7 +98,10 @@ where
9998
}
10099

101100
let percentile_premium = weighted_quick_select(premiums, limits, BLOCK_GAS_TARGET_INDEX);
102-
Ok(compute_next_base_fee_from_premium(parent_base_fee, percentile_premium))
101+
Ok(compute_next_base_fee_from_premium(
102+
parent_base_fee,
103+
percentile_premium,
104+
))
103105
}
104106

105107
pub(crate) fn compute_next_base_fee_from_premium(

src/chain/store/weighted_quick_select.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ pub fn weighted_quick_select(
2424
mut target_index: u64,
2525
) -> TokenAmount {
2626
loop {
27-
match premiums.as_slice() {
28-
[] => return TokenAmount::zero(),
29-
[premium] => {
30-
return if limits[0] > target_index {
27+
match (premiums.as_slice(), limits.as_slice()) {
28+
([], _) => return TokenAmount::zero(),
29+
([premium], [limit]) => {
30+
return if *limit > target_index {
3131
premium.clone()
3232
} else {
3333
TokenAmount::zero()

0 commit comments

Comments
 (0)