diff --git a/core/go/componenttest/component_test.go b/core/go/componenttest/component_test.go index 9ec12e59e..f8390324d 100644 --- a/core/go/componenttest/component_test.go +++ b/core/go/componenttest/component_test.go @@ -400,6 +400,33 @@ func TestPrivateTransactionRevertedAssembleFailed(t *testing.T) { assert.Regexp(t, domains.SimpleDomainInsufficientFundsError, txFull.Receipt.FailureMessage) assert.Regexp(t, "SDE0001", txFull.Receipt.FailureMessage) + //Check that the domain is left in a healthy state and we can submit good transactions + // Start a private transaction - Mint to alice + var goodTxID uuid.UUID + err = rpcClient.CallRPC(ctx, &goodTxID, "ptx_sendTransaction", &pldapi.TransactionInput{ + ABI: *domains.SimpleTokenTransferABI(), + TransactionBase: pldapi.TransactionBase{ + To: contractAddress, + Domain: "domain1", + IdempotencyKey: "goodTx", + Type: pldapi.TransactionTypePrivate.Enum(), + From: "wallets.org1.aaaaaa", + Data: tktypes.RawJSON(`{ + "from": "", + "to": "wallets.org1.bbbbbb", + "amount": "123000000000000000000" + }`), + }, + }) + + require.NoError(t, err) + assert.NotEqual(t, uuid.UUID{}, goodTxID) + assert.Eventually(t, + transactionReceiptCondition(t, ctx, goodTxID, rpcClient, false), + transactionLatencyThreshold(t), + 100*time.Millisecond, + "Transaction did not receive a receipt", + ) } func TestDeployOnOneNodeInvokeOnAnother(t *testing.T) { diff --git a/core/go/internal/privatetxnmgr/transaction_flow_mutators.go b/core/go/internal/privatetxnmgr/transaction_flow_mutators.go index 9357c6990..cb54c4e67 100644 --- a/core/go/internal/privatetxnmgr/transaction_flow_mutators.go +++ b/core/go/internal/privatetxnmgr/transaction_flow_mutators.go @@ -99,6 +99,7 @@ func (tf *transactionFlow) applyTransactionAssembledEvent(ctx context.Context, e revertReason = *event.PostAssembly.RevertReason } tf.revertTransaction(ctx, i18n.ExpandWithCode(ctx, i18n.MessageKey(msgs.MsgPrivateTxManagerAssembleRevert), revertReason)) + tf.assembleCoordinator.Complete(event.AssembleRequestID, nil) return } if tf.transaction.PostAssembly.AssemblyResult == prototk.AssembleTransactionResponse_PARK { @@ -106,6 +107,7 @@ func (tf *transactionFlow) applyTransactionAssembledEvent(ctx context.Context, e log.L(ctx).Infof("AssemblyResult is AssembleTransactionResponse_PARK") tf.status = "parked" tf.assemblePending = false + tf.assembleCoordinator.Complete(event.AssembleRequestID, nil) return } tf.status = "assembled"