pub enum TryCommitResult {
Ok,
TxDeterministicError,
TxRootFrameReverted,
TxNonDeterministicError(DbConflictResult),
FailedGasSponsorship,
TxValidationFailure,
SystemError,
Unrecoverable,
}Expand description
Outcome of a two-phase commit (try_commit_transaction).
Mirrors the codes of ExecResult, one variant per code, so a commit
outcome is matched exhaustively. Only ExecResultTxNonDeterministicError
carries a two-phase-commit conflict diagnostic, so the DbConflictResult
rides on that variant alone — there is no way to reach a conflict after a
successful (or otherwise-failed) commit.
Variants§
Ok
ExecResultOK — the commit succeeded.
TxDeterministicError
ExecResultTxDeterministicError — the root frame returned a
deterministic error.
TxRootFrameReverted
ExecResultTxRootFrameReverted — the root frame chose to revert.
TxNonDeterministicError(DbConflictResult)
ExecResultTxNonDeterministicError — nondeterminism during the
post-execution two-phase commit (a storage conflict). Carries the
conflict diagnostic; DbConflictResult::kDbDiagnosticNone when the
database reported no per-conflict detail for this execution mode.
FailedGasSponsorship
ExecResultFailedGasSponsorship — no longer produced; retained to
mirror ExecResult.
TxValidationFailure
ExecResultTxValidationFailure — attached validation data was bad.
SystemError
ExecResultSystemError — recoverable system error (e.g. broken
connection).
Unrecoverable
ExecResultUnrecoverable — critical, unrecoverable executor failure.
Implementations§
Source§impl TryCommitResult
impl TryCommitResult
Sourcepub fn exec_result(&self) -> ExecResult
pub fn exec_result(&self) -> ExecResult
The ExecResult code this outcome corresponds to, discarding any
conflict diagnostic.