File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -825,6 +825,9 @@ mod tests {
825825 } ;
826826 use fuel_core_storage:: transactional:: WriteTransaction ;
827827
828+ // this invariant doesn't hold anymore
829+ // because we have removed columns from the storage
830+ #[ ignore]
828831 #[ test]
829832 fn column_keys_not_exceed_count_test ( ) {
830833 column_keys_not_exceed_count :: < OffChain > ( ) ;
Original file line number Diff line number Diff line change @@ -63,11 +63,17 @@ where
6363 Description : DatabaseDescription ,
6464{
6565 fn default ( ) -> Self {
66- use strum:: EnumCount ;
66+ use enum_iterator:: all;
67+ let mut largest_column_idx = 0 ;
68+
69+ for column in all :: < Description :: Column > ( ) {
70+ largest_column_idx = largest_column_idx. max ( column. as_usize ( ) ) ;
71+ }
72+
6773 Self {
68- inner : ( 0 ..Description :: Column :: COUNT )
74+ inner : ( 0 ..largest_column_idx . checked_add ( 1 ) . expect ( "too many columns" ) )
6975 . map ( |_| Mutex :: new ( BTreeMap :: new ( ) ) )
70- . collect ( ) ,
76+ . collect :: < Vec < _ > > ( ) ,
7177 _marker : Default :: default ( ) ,
7278 }
7379 }
Original file line number Diff line number Diff line change 9696 . map_err ( crate :: errors:: CompressionError :: FailedToCompressBlock ) ?;
9797
9898 storage_tx. write_compressed_block (
99- block_helpers:: height ( & block_with_metadata) ,
99+ block_helpers:: height ( block_with_metadata) ,
100100 & compressed_block,
101101 ) ?;
102102
You can’t perform that action at this time.
0 commit comments