@@ -2863,19 +2863,28 @@ impl SortitionDB {
2863
2863
let tip = SortitionDB :: get_canonical_burn_chain_tip ( db_tx) ?;
2864
2864
let existing_epoch_idx = StacksEpoch :: find_epoch ( & existing_epochs, tip. block_height )
2865
2865
. 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
+ ) ;
2867
2870
} ) ;
2868
2871
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
+ ) ;
2872
2878
} ) ;
2873
2879
2874
2880
// can't retcon epochs -- all epochs up to (but excluding) the tip's epoch in both epoch
2875
2881
// lists must be the same.
2876
2882
for i in 0 ..existing_epoch_idx. min ( new_epoch_idx) {
2877
2883
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
+ ) ;
2879
2888
}
2880
2889
}
2881
2890
@@ -2885,7 +2894,10 @@ impl SortitionDB {
2885
2894
diff_epoch. end_height = epochs[ new_epoch_idx] . end_height ;
2886
2895
2887
2896
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
+ ) ;
2889
2901
}
2890
2902
2891
2903
if tip. block_height >= epochs[ new_epoch_idx] . end_height {
0 commit comments