Closed FredericHeem closed 9 years ago
Is this running against the test network? If so, what was the last ledger your instance imported?
The importer should never run into this situation, since transactions that have failed should be filtered out prior to this function being executed. That seems indicative of a stellar-core issue.
Are you running on a custom fork that tries to import failed transactions?
Indeed, it is running on my own fork with the imported failed transaction.
The vanilla ruby horizon is not affected.
I'm wondering if the line make_trades effects, source_account, scresult.offers_claimed
gets ever called.
How can we generate code coverage ?
I don't have code coverage integrated into the test suite. If you would like to do it, I recommend https://github.com/colszowka/simplecov.
I doubt you'd hit those lines in the test suite... once we decided that this codebase's lifetime is limited, I've relied on simple manual testing to confirm behaviour.
To do, so, run: RAILS_ENV=test ./bin/rake db:build_scenarios
. This command will play all of the scc scenario files at spec/fixtures/scenarios/*.rb
and then re-import the resulting ledger data. The sql files at spec/fixtures/scenarios/*-horizon.sql
will be updated and you can verify that the history_effects
table is properly populated.
I'm postive the line you are wondering about is being hit for normal manage offers, but looking over the scenarios, I have not specifically tested it with passive offers. Should be trivial to work up.
Here is the error message after updating to the latest code: