dyne / restroom-mw

🛠 Easy REST API builder executing Zencode
https://restroom.dyne.org
GNU Affero General Public License v3.0
3 stars 11 forks source link

Detect cycles in chain execution and launch an exception in case #72

Closed pasfranc closed 2 years ago

pasfranc commented 2 years ago

In the event we have a cycle into the chain, i.e. contr A next is B and contr. B next is A the chain executor is never stopping and forever running in a a loop. We need to prevent it navigating the blocks before the chain execution (going next by next) and counting. If counter > # of blocks defined in a yaml file => we have a loop. Execution is aborted because a cycle is detected