Open vogel opened 6 years ago
I was looking at this one. I'm catching up and still haven't hit the path payment ones but for the first 2 you posted:
cool, thanks for looking into these!
ChangeTrustOpFrame::doCheckValid
(there is a check already for isAssetValid
but native
is a valid asset)CHANGE_TRUST_MALFORMED
error codeif you look at https://github.com/stellar/stellar-core/blob/master/src/transactions/TxResultsTests.cpp#L205
it's actually not comparing the result of the transaction if it runs into an internal error.
This is wrong: the 3rd operation in the current version of the protocol (since version 7 I think, I am going to add a complete protocol release notes shortly to make it easier to track those down) will fail with opNO_ACCOUNT
as expected).
This validate
lambda is error prone: we should never skip the apply
check if applyResult
is set.
Also, I wonder if most of the code in that lambda should be replaced to use txtest::applyCheck
.
Note that when running transaction tests you should run tests with the --all-versions
option on the command line, for example:
./stellar-core --test --all-versions '[tx]'
Ah I didn't scroll down far enough to see ChangeTrustOpFrame::doCheckValid
. Also, CHANGE_TRUST_MALFORMED
seems to be appropriate for this error as well. I'll create the PR with those changes later today.
As for the transaction test, I'll check it out later. Also, I wasn't aware of the --all-versions
parameter.
I am renaming this issue to track the second issue that was identified (tests are wrong)
There are several exceptions thrown during testnet catchup, we need to check what is causing those:
Those exceptions do not cause catchup error, so we probably ends with txINTERNAL_ERROR, but this is interesting what causes those.