Closed pschuermann97 closed 1 year ago
I think you need adapt the test cases to the new workflow 🤔
Tests work again, added possibility to turn off double-spending database synchronization for test cases that do not intend to test it. DBSyncIntegrationTest is the test class that tests all functionality around the Spend-Deduct mechanism.
@pschuermann97 What about this PR?
this is an old attempt to fix the tests for the incentive service in presence of offline double-spending protection (problem was that in the unit tests for the incentive service, no dsp service instance was running, so all tests involving the spend-deduct protocol failed).
In this PR, I implemented a flag to turn the double-spending protection off where it was not needed.
However, you conviced me that this is a bad idea since it introduces an attack vector for the sake of testing.
Long story short, this PR and branch are no longer needed.
Changes in this PR:
rejection mechanism for transactions: incentive service now queries dsprotection service whether dsid of occured transaction is already contained in database. If dsp service is alive and returns true, the transaction is immediately aborted and not ever recorded in the database.
Checklist:
Select whatever applies: