Skip to content

[invariant] reg tests and multiple messages

akrokr requested to merge akh/inv_fmt into develop
  1. Changes the format of invariants to have an array of messages instead of a single newline-delimited message. This is done by copying/modifying the cosmos Invariant types to our own common types. Closes #1574 (closed)

  2. Runs all the invariants at the end of each regression test. Doing it at the end instead of per-block to avoid all the extra work. They can still be checked manually anywhere in suites if intermediate states need to be checked. Closes #1493 (closed)

Example failure:

7:05PM INF cmd/run.go:292 > Checking invariants
7:05PM ERR cmd/run.go:296 > invariants failed error="thorchain invariant is broken: [oversolvent: 1rune]"

A new break was detected on rebase. I've opened an issue to fix it #1590 (closed), and for this pr I'm just modifying the starting state of the suite to start out broken so the bug ends up leaving things in a sane state.

Edited by akrokr

Merge request reports