Skip to content

Commit 51218eb

Browse files
committed
style: run linter
1 parent 613c919 commit 51218eb

File tree

2 files changed

+60
-33
lines changed

2 files changed

+60
-33
lines changed

data_structures/src/chain/priority.rs

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -752,38 +752,65 @@ pub mod strategies {
752752
// minimum and maximum among all the lowest priorities, i.e. what was the priority for the
753753
// less prioritized transaction in the blocks with the lowest and highest priority
754754
// requirements.
755-
let (drt_lowest_absolute, drt_highest_absolute, vtt_lowest_absolute, vtt_highest_absolute, st_lowest_absolute, st_highest_absolute, ut_lowest_absolute, ut_highest_absolute) =
756-
priorities.clone().fold(
757-
(f64::MAX, 0.0f64, f64::MAX, 0.0f64, f64::MAX, 0.0f64, f64::MAX, 0.0f64),
758-
|(drt_lowest, drt_highest, vtt_lowest, vtt_highest, st_lowest, st_highest, ut_lowest, ut_highest), priorities| {
759-
let drt_min = priorities
760-
.drt_lowest
761-
.unwrap_or(priorities.drt_highest)
762-
.as_f64();
763-
let vtt_min = priorities
764-
.vtt_lowest
765-
.unwrap_or(priorities.vtt_highest)
766-
.as_f64();
767-
let st_min = priorities
768-
.st_lowest
769-
.unwrap_or(priorities.st_highest)
770-
.as_f64();
771-
let ut_min = priorities
772-
.ut_lowest
773-
.unwrap_or(priorities.ut_highest)
774-
.as_f64();
775-
(
776-
drt_lowest.min(drt_min),
777-
drt_highest.max(drt_min),
778-
vtt_lowest.min(vtt_min),
779-
vtt_highest.max(vtt_min),
780-
st_lowest.min(st_min),
781-
st_highest.max(st_min),
782-
ut_lowest.min(ut_min),
783-
ut_highest.max(ut_min),
784-
)
785-
},
786-
);
755+
let (
756+
drt_lowest_absolute,
757+
drt_highest_absolute,
758+
vtt_lowest_absolute,
759+
vtt_highest_absolute,
760+
st_lowest_absolute,
761+
st_highest_absolute,
762+
ut_lowest_absolute,
763+
ut_highest_absolute,
764+
) = priorities.clone().fold(
765+
(
766+
f64::MAX,
767+
0.0f64,
768+
f64::MAX,
769+
0.0f64,
770+
f64::MAX,
771+
0.0f64,
772+
f64::MAX,
773+
0.0f64,
774+
),
775+
|(
776+
drt_lowest,
777+
drt_highest,
778+
vtt_lowest,
779+
vtt_highest,
780+
st_lowest,
781+
st_highest,
782+
ut_lowest,
783+
ut_highest,
784+
),
785+
priorities| {
786+
let drt_min = priorities
787+
.drt_lowest
788+
.unwrap_or(priorities.drt_highest)
789+
.as_f64();
790+
let vtt_min = priorities
791+
.vtt_lowest
792+
.unwrap_or(priorities.vtt_highest)
793+
.as_f64();
794+
let st_min = priorities
795+
.st_lowest
796+
.unwrap_or(priorities.st_highest)
797+
.as_f64();
798+
let ut_min = priorities
799+
.ut_lowest
800+
.unwrap_or(priorities.ut_highest)
801+
.as_f64();
802+
(
803+
drt_lowest.min(drt_min),
804+
drt_highest.max(drt_min),
805+
vtt_lowest.min(vtt_min),
806+
vtt_highest.max(vtt_min),
807+
st_lowest.min(st_min),
808+
st_highest.max(st_min),
809+
ut_lowest.min(ut_min),
810+
ut_highest.max(ut_min),
811+
)
812+
},
813+
);
787814

788815
// The size of each bucket in nWitWu (nano wits per weight unit)
789816
let drt_buckets_size = (drt_highest_absolute - drt_lowest_absolute) / buckets_count;

data_structures/src/superblock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ impl SuperBlockState {
490490
// (assume this takes a week).
491491
// Add 7 x 1_920 epochs to take into account the activation delay for V2_0:
492492
// 3_048_960 + 7 x 1_920 + 7 x 1_920 = 3_075_840
493-
//
493+
//
494494
// After that, wit/2.0 should be activated with a fixed superblock bootstrap
495495
// committee.
496496
//

0 commit comments

Comments
 (0)