With @hedayat we are writing the example hApp LeaP for the DevCamp 6. We have come across a bug that has surfaced a question.
This is the situation: in our hApp, we have a course entry with an array of module entry addresses, a name, a teacher address and a timestamp. Here is the design if anyone wants more detail: https://hackmd.io/_Uvrwr1HSNmfsWHqymcgvA.
At first, course is created only with its name, teacher and timestamp, with no modules. When we add a module to the course, the course entry is updated. But, if we remove all modules from the course, we are calling
update_entry with the exact same contents of the entry as the original entry that we had created.
At this point, Holochain hangs. It does not respond to requests anymore, and we think this is a bug in core.
But, this leads to another question, which is: what is the expected behaviour in this case? Will holochain be smart enough to recognize that this new update is part of that same entry’s chain? Should we develop happs preventing this from ever happening?
Tagging @pauldaoust, maybe you can shed some light in this? We want to have the best responses for the participants of the DevCamp.