Reverting a block that consumed a source can delete the source, in SINDEX sub-index (indexForConditions)
This unit test failed "revert b#3-4 and re-commit block#3 should be ok"
Cause:
- In
LevelDBSindex.removeBlock()
(for reverting a block), we calltrimConditions()
when a consumption is undone (when theUPDATE
record should be deleted) even if a source creation exists.
Solution:
- The correct approach would be to call
trimConditions()
only when no source creation exists anymore.