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