@@ -130,67 +130,68 @@ impl AptosDB {
130130 ledger_info_with_sigs : Option < & LedgerInfoWithSignatures > ,
131131 sync_commit : bool ,
132132 ) -> Result < ( ) > {
133- let ( transactions, transaction_outputs, transaction_infos) =
134- Self :: disassemble_txns_to_commit ( txns_to_commit) ;
135- // Keep auxiliary info consistent with what was used to create TransactionInfo
136- // Use block-relative indices to match what was used during TransactionInfo creation
137- let persisted_auxiliary_infos = txns_to_commit
138- . iter ( )
139- . map (
140- |txn_to_commit| match txn_to_commit. transaction_info . auxiliary_info_hash ( ) {
141- Some ( hash) => {
142- for i in 0 ..100 {
143- if hash
144- == CryptoHash :: hash ( & PersistedAuxiliaryInfo :: V1 {
145- transaction_index : i as u32 ,
146- } )
147- {
148- return PersistedAuxiliaryInfo :: V1 {
149- transaction_index : i as u32 ,
150- } ;
151- }
152- }
153- panic ! ( "Hash not found" ) ;
154- } ,
155- None => PersistedAuxiliaryInfo :: None ,
156- } ,
157- )
158- . collect ( ) ;
159- let transactions_to_keep = TransactionsToKeep :: make (
160- first_version,
161- transactions,
162- transaction_outputs,
163- persisted_auxiliary_infos,
164- ) ;
133+ unimplemented ! ( ) ;
134+ // let (transactions, transaction_outputs, transaction_infos) =
135+ // Self::disassemble_txns_to_commit(txns_to_commit);
136+ // // Keep auxiliary info consistent with what was used to create TransactionInfo
137+ // // Use block-relative indices to match what was used during TransactionInfo creation
138+ // let persisted_auxiliary_infos = txns_to_commit
139+ // .iter()
140+ // .map(
141+ // |txn_to_commit| match txn_to_commit.transaction_info.auxiliary_info_hash() {
142+ // Some(hash) => {
143+ // for i in 0..100 {
144+ // if hash
145+ // == CryptoHash::hash(&PersistedAuxiliaryInfo::V1 {
146+ // transaction_index: i as u32,
147+ // })
148+ // {
149+ // return PersistedAuxiliaryInfo::V1 {
150+ // transaction_index: i as u32,
151+ // };
152+ // }
153+ // }
154+ // panic!("Hash not found");
155+ // },
156+ // None => PersistedAuxiliaryInfo::None,
157+ // },
158+ // )
159+ // .collect();
160+ // let transactions_to_keep = TransactionsToKeep::make(
161+ // first_version,
162+ // transactions,
163+ // transaction_outputs,
164+ // persisted_auxiliary_infos,
165+ // );
165166
166- let current = self . state_store . current_state_locked ( ) . clone ( ) ;
167- let ( hot_state, persisted_state) = self . state_store . get_persisted_state ( ) ?;
168- let ( new_state, reads) = current. ledger_state ( ) . update_with_db_reader (
169- & persisted_state,
170- hot_state,
171- transactions_to_keep. state_update_refs ( ) ,
172- self . state_store . clone ( ) ,
173- ) ?;
174- let persisted_summary = self . state_store . get_persisted_state_summary ( ) ?;
175- let new_state_summary = current. ledger_state_summary ( ) . update (
176- & ProvableStateSummary :: new ( persisted_summary, self ) ,
177- transactions_to_keep. state_update_refs ( ) ,
178- ) ?;
167+ // let current = self.state_store.current_state_locked().clone();
168+ // let (hot_state, persisted_state) = self.state_store.get_persisted_state()?;
169+ // let (new_state, reads) = current.ledger_state().update_with_db_reader(
170+ // &persisted_state,
171+ // hot_state,
172+ // transactions_to_keep.state_update_refs(),
173+ // self.state_store.clone(),
174+ // )?;
175+ // let persisted_summary = self.state_store.get_persisted_state_summary()?;
176+ // let new_state_summary = current.ledger_state_summary().update(
177+ // &ProvableStateSummary::new(persisted_summary, self),
178+ // transactions_to_keep.state_update_refs(),
179+ // )?;
179180
180- let chunk = ChunkToCommit {
181- first_version,
182- transactions : & transactions_to_keep. transactions ,
183- persisted_auxiliary_infos : & transactions_to_keep. persisted_auxiliary_infos ,
184- transaction_outputs : & transactions_to_keep. transaction_outputs ,
185- transaction_infos : & transaction_infos,
186- state : & new_state,
187- state_summary : & new_state_summary,
188- state_update_refs : transactions_to_keep. state_update_refs ( ) ,
189- state_reads : & reads,
190- is_reconfig : transactions_to_keep. is_reconfig ( ) ,
191- } ;
181+ // let chunk = ChunkToCommit {
182+ // first_version,
183+ // transactions: &transactions_to_keep.transactions,
184+ // persisted_auxiliary_infos: &transactions_to_keep.persisted_auxiliary_infos,
185+ // transaction_outputs: &transactions_to_keep.transaction_outputs,
186+ // transaction_infos: &transaction_infos,
187+ // state: &new_state,
188+ // state_summary: &new_state_summary,
189+ // state_update_refs: transactions_to_keep.state_update_refs(),
190+ // state_reads: &reads,
191+ // is_reconfig: transactions_to_keep.is_reconfig(),
192+ // };
192193
193- self . save_transactions ( chunk, ledger_info_with_sigs, sync_commit)
194+ // self.save_transactions(chunk, ledger_info_with_sigs, sync_commit)
194195 }
195196
196197 fn disassemble_txns_to_commit (
0 commit comments