Skip to content

Commit

Permalink
Fixed assert failure when Soroban tx was sumbitted pre p20 (#4414)
Browse files Browse the repository at this point in the history
# Description

Following the TX frame refactor, there is an assertion failure when
submitting Soroban TXs pre protocol 20. This was actually a bug before
the refactor, where a Soroban TX would fail to get added to the queue
with `ADD_STATUS_ERROR`, but the diagnostics would report `txSUCCESS`.
The assert is correct, but the queue now rejects the transaction and
sets `txNOT_SUPPORTED`. This is TX queue behavior so this won't effect
TX replay.

# Checklist
- [x] Reviewed the
[contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes)
document
- [x] Rebased on top of master (no merge commits)
- [x] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio
extension)
- [x] Compiles
- [x] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the
[performance
document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
  • Loading branch information
marta-lokhova authored Aug 5, 2024
2 parents e92596f + 7117680 commit e7e7678
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/herder/HerderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,9 @@ HerderImpl::recvTransaction(TransactionFrameBasePtr tx, bool submittedFromSelf)
{
// Received Soroban transaction before protocol 20; since this
// transaction isn't supported yet, return ERROR
result.code = TransactionQueue::AddResultCode::ADD_STATUS_ERROR;
result = TransactionQueue::AddResult(
TransactionQueue::AddResultCode::ADD_STATUS_ERROR, tx,
txNOT_SUPPORTED);
}

if (result.code == TransactionQueue::AddResultCode::ADD_STATUS_PENDING)
Expand Down

0 comments on commit e7e7678

Please sign in to comment.