@@ -1670,8 +1670,10 @@ impl AuthorityState {
1670
1670
) ;
1671
1671
assert_eq ! ( new_object. version( ) , oref. 1 , "tx_digest={:?} error processing object owner index, object {:?} from written has mismatched version. Actual: {}, expected: {}" , tx_digest, id, new_object. version( ) , oref. 1 ) ;
1672
1672
1673
- let Some ( df_info) = self . try_create_dynamic_field_info ( new_object, written, module_resolver)
1674
- . expect ( "try_create_dynamic_field_info should not fail." ) else {
1673
+ let Some ( df_info) = self
1674
+ . try_create_dynamic_field_info ( new_object, written, module_resolver)
1675
+ . expect ( "try_create_dynamic_field_info should not fail." )
1676
+ else {
1675
1677
// Skip indexing for non dynamic field objects.
1676
1678
continue ;
1677
1679
} ;
@@ -2109,8 +2111,8 @@ impl AuthorityState {
2109
2111
genesis_objects : & [ Object ] ,
2110
2112
epoch_store : & Arc < AuthorityPerEpochStore > ,
2111
2113
) -> SuiResult {
2112
- let Some ( index_store) = & self . indexes else {
2113
- return Ok ( ( ) )
2114
+ let Some ( index_store) = & self . indexes else {
2115
+ return Ok ( ( ) ) ;
2114
2116
} ;
2115
2117
if !index_store. is_empty ( ) {
2116
2118
return Ok ( ( ) ) ;
@@ -2126,7 +2128,12 @@ impl AuthorityState {
2126
2128
) ) ,
2127
2129
Owner :: ObjectOwner ( object_id) => {
2128
2130
let id = o. id ( ) ;
2129
- let Some ( info) = self . try_create_dynamic_field_info ( o, & BTreeMap :: new ( ) , epoch_store. module_cache ( ) ) ? else {
2131
+ let Some ( info) = self . try_create_dynamic_field_info (
2132
+ o,
2133
+ & BTreeMap :: new ( ) ,
2134
+ epoch_store. module_cache ( ) ,
2135
+ ) ?
2136
+ else {
2130
2137
continue ;
2131
2138
} ;
2132
2139
new_dynamic_fields. push ( ( ( ObjectID :: from ( object_id) , id) , info) ) ;
@@ -2532,15 +2539,19 @@ impl AuthorityState {
2532
2539
epoch_store : & AuthorityPerEpochStore ,
2533
2540
) -> SuiResult < Option < VerifiedCheckpoint > > {
2534
2541
let checkpoint = self . get_transaction_checkpoint_sequence ( digest, epoch_store) ?;
2535
- let Some ( checkpoint) = checkpoint else { return Ok ( None ) ; } ;
2542
+ let Some ( checkpoint) = checkpoint else {
2543
+ return Ok ( None ) ;
2544
+ } ;
2536
2545
let checkpoint = self
2537
2546
. checkpoint_store
2538
2547
. get_checkpoint_by_sequence_number ( checkpoint) ?;
2539
2548
Ok ( checkpoint)
2540
2549
}
2541
2550
2542
2551
pub fn get_object_read ( & self , object_id : & ObjectID ) -> SuiResult < ObjectRead > {
2543
- let Some ( ( object_key, store_object) ) = self . database . get_latest_object_or_tombstone ( * object_id) ? else {
2552
+ let Some ( ( object_key, store_object) ) =
2553
+ self . database . get_latest_object_or_tombstone ( * object_id) ?
2554
+ else {
2544
2555
return Ok ( ObjectRead :: NotExists ( * object_id) ) ;
2545
2556
} ;
2546
2557
if let Some ( object_ref) = self
@@ -2608,7 +2619,10 @@ impl AuthorityState {
2608
2619
version : SequenceNumber ,
2609
2620
) -> SuiResult < PastObjectRead > {
2610
2621
// Firstly we see if the object ever existed by getting its latest data
2611
- let Some ( obj_ref) = self . database . get_latest_object_ref_or_tombstone ( * object_id) ? else {
2622
+ let Some ( obj_ref) = self
2623
+ . database
2624
+ . get_latest_object_ref_or_tombstone ( * object_id) ?
2625
+ else {
2612
2626
return Ok ( PastObjectRead :: ObjectNotExists ( * object_id) ) ;
2613
2627
} ;
2614
2628
@@ -3626,7 +3640,9 @@ impl AuthorityState {
3626
3640
system_package. dependencies ( ) . to_vec ( ) ,
3627
3641
max_binary_format_version,
3628
3642
no_extraneous_module_bytes,
3629
- ) . await else {
3643
+ )
3644
+ . await
3645
+ else {
3630
3646
return vec ! [ ] ;
3631
3647
} ;
3632
3648
results. push ( obj_ref) ;
@@ -3908,11 +3924,14 @@ impl AuthorityState {
3908
3924
// since system packages are created during the current epoch, they should abide by the
3909
3925
// rules of the current epoch, including the current epoch's max Move binary format version
3910
3926
let config = epoch_store. protocol_config ( ) ;
3911
- let Some ( next_epoch_system_package_bytes) = self . get_system_package_bytes (
3912
- next_epoch_system_packages. clone ( ) ,
3913
- config. move_binary_format_version ( ) ,
3914
- config. no_extraneous_module_bytes ( ) ,
3915
- ) . await else {
3927
+ let Some ( next_epoch_system_package_bytes) = self
3928
+ . get_system_package_bytes (
3929
+ next_epoch_system_packages. clone ( ) ,
3930
+ config. move_binary_format_version ( ) ,
3931
+ config. no_extraneous_module_bytes ( ) ,
3932
+ )
3933
+ . await
3934
+ else {
3916
3935
error ! (
3917
3936
"upgraded system packages {:?} are not locally available, cannot create \
3918
3937
ChangeEpochTx. validator binary must be upgraded to the correct version!",
@@ -3926,7 +3945,9 @@ impl AuthorityState {
3926
3945
// state sync, and execute it. This will upgrade the framework packages, reconfigure,
3927
3946
// and most likely shut down in the new epoch (this validator likely doesn't support
3928
3947
// the new protocol version, or else it should have had the packages.)
3929
- return Err ( anyhow ! ( "missing system packages: cannot form ChangeEpochTx" ) ) ;
3948
+ return Err ( anyhow ! (
3949
+ "missing system packages: cannot form ChangeEpochTx"
3950
+ ) ) ;
3930
3951
} ;
3931
3952
3932
3953
let tx = if epoch_store
0 commit comments