fix issue

This commit is contained in:
Peter Zhang 2025-07-07 23:10:25 +08:00
parent 4dac3ce3ba
commit ce9977ff29

View File

@ -316,9 +316,8 @@ impl LogStoreWrite for LogManager {
.tx_store .tx_store
.get_tx_seq_list_by_data_root(&tx.data_merkle_root)?; .get_tx_seq_list_by_data_root(&tx.data_merkle_root)?;
// Check if there are other same-root transaction not finalized. // Check if there are other same-root transaction not finalized.
if same_root_seq_list.first() == Some(&tx_seq) { self.copy_tx_and_finalize(tx_seq, same_root_seq_list)?;
self.copy_tx_and_finalize(tx_seq, same_root_seq_list)?;
}
self.tx_store.finalize_tx(tx_seq)?; self.tx_store.finalize_tx(tx_seq)?;
Ok(()) Ok(())
} else { } else {
@ -353,9 +352,8 @@ impl LogStoreWrite for LogManager {
.tx_store .tx_store
.get_tx_seq_list_by_data_root(&tx.data_merkle_root)?; .get_tx_seq_list_by_data_root(&tx.data_merkle_root)?;
// Check if there are other same-root transaction not finalized. // Check if there are other same-root transaction not finalized.
if same_root_seq_list.first() == Some(&tx_seq) { self.copy_tx_and_finalize(tx_seq, same_root_seq_list)?;
self.copy_tx_and_finalize(tx_seq, same_root_seq_list)?;
}
metrics::FINALIZE_TX_WITH_HASH.update_since(start_time); metrics::FINALIZE_TX_WITH_HASH.update_since(start_time);
Ok(true) Ok(true)
} else { } else {