Skip to content

Commit fcaf971

Browse files
committed
chore: cargo fmt
1 parent d420a36 commit fcaf971

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

stackslib/src/chainstate/burn/db/sortdb.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,19 +2863,28 @@ impl SortitionDB {
28632863
let tip = SortitionDB::get_canonical_burn_chain_tip(db_tx)?;
28642864
let existing_epoch_idx = StacksEpoch::find_epoch(&existing_epochs, tip.block_height)
28652865
.unwrap_or_else(|| {
2866-
panic!("FATAL: Sortition tip {} has no epoch in its existing epochs table", tip.block_height);
2866+
panic!(
2867+
"FATAL: Sortition tip {} has no epoch in its existing epochs table",
2868+
tip.block_height
2869+
);
28672870
});
28682871

2869-
let new_epoch_idx = StacksEpoch::find_epoch(&epochs, tip.block_height)
2870-
.unwrap_or_else(|| {
2871-
panic!("FATAL: Sortition tip {} has no epoch in the configured epochs list", tip.block_height);
2872+
let new_epoch_idx =
2873+
StacksEpoch::find_epoch(&epochs, tip.block_height).unwrap_or_else(|| {
2874+
panic!(
2875+
"FATAL: Sortition tip {} has no epoch in the configured epochs list",
2876+
tip.block_height
2877+
);
28722878
});
28732879

28742880
// can't retcon epochs -- all epochs up to (but excluding) the tip's epoch in both epoch
28752881
// lists must be the same.
28762882
for i in 0..existing_epoch_idx.min(new_epoch_idx) {
28772883
if existing_epochs[i] != epochs[i] {
2878-
panic!("FATAL: tried to retcon epoch {:?} into epoch {:?}", &existing_epochs[i], &epochs[i]);
2884+
panic!(
2885+
"FATAL: tried to retcon epoch {:?} into epoch {:?}",
2886+
&existing_epochs[i], &epochs[i]
2887+
);
28792888
}
28802889
}
28812890

@@ -2885,7 +2894,10 @@ impl SortitionDB {
28852894
diff_epoch.end_height = epochs[new_epoch_idx].end_height;
28862895

28872896
if diff_epoch != epochs[new_epoch_idx] {
2888-
panic!("FATAL: tried to change current epoch {:?} into {:?}", &existing_epochs[existing_epoch_idx], &epochs[new_epoch_idx]);
2897+
panic!(
2898+
"FATAL: tried to change current epoch {:?} into {:?}",
2899+
&existing_epochs[existing_epoch_idx], &epochs[new_epoch_idx]
2900+
);
28892901
}
28902902

28912903
if tip.block_height >= epochs[new_epoch_idx].end_height {

0 commit comments

Comments
 (0)