Skip to content

Commit

Permalink
Remove tx from pending logs (MystenLabs#12889)
Browse files Browse the repository at this point in the history
## Description 

Remove tx from pending logs

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
Remove tx from pending logs
  • Loading branch information
longbowlu authored Jul 7, 2023
1 parent 5edf20a commit a946835
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions crates/sui-core/src/transaction_orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ where
..
},
))) => {
let tx_digest = transaction.digest();
if let Err(err) = pending_transaction_log.finish_transaction(tx_digest) {
panic!(
"Failed to finish transaction {tx_digest} in pending transaction log: {err}"
);
}

if transaction.contains_shared_object() {
// Do not locally execute transactions with shared objects, as this can
// cause forks until MVCC is merged.
Expand All @@ -442,13 +449,7 @@ where
transaction,
effects_cert.executed_epoch(),
);
let tx_digest = executable_tx.digest();
if let Err(err) = pending_transaction_log.finish_transaction(tx_digest) {
error!(
?tx_digest,
"Failed to finish transaction in pending transaction log: {err}"
);
}

let _ = Self::execute_finalized_tx_locally_with_timeout(
&validator_state,
&executable_tx,
Expand Down

0 comments on commit a946835

Please sign in to comment.