Skip to content

External validator: message handling outside of main loop

Alain Mebsout requested to merge alain@functori@external-validator-gadt into master

What

Message handling by the external validator is now done in a separate function, and the receive-send loop is more explicit.

Fixes #5177 (closed).

Why

This change makes it explicit that the handling code is outside of the error monad and the only way to exit the loop is to receive the 'Terminate' message.

This change is also necessary to factorize the external validator code (that is not validator specific) for reuse in the external injector.

How

A GADT was introduced for the type of messages to correlate their result.

Manually testing the MR

  • Check that the loop function is identical minus the send and recursive calls.
  • CI

Merge request reports