Skip to content

Commit

Permalink
[proxima-direct-core] allow creation of committed transaction in caching
Browse files Browse the repository at this point in the history
  • Loading branch information
je-ik committed Jan 20, 2025
1 parent 9a35f5c commit 5fab79c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,11 @@ public void ensureTransactionOpen(String transactionId, State state) {
@VisibleForTesting
@Nullable
CachedTransaction createCachedTransaction(String transactionId, State state) {
Preconditions.checkArgument(state.getCommittedOutputs().isEmpty());
Preconditions.checkArgument(
state.getCommittedOutputs().isEmpty() || state.getFlags() == State.Flags.COMMITTED,
"Invalid state of transaction %s: %s",
transactionId,
state.getFlags());
if (state.getInputAttributes().isEmpty()) {
return null;
}
Expand Down

0 comments on commit 5fab79c

Please sign in to comment.