2019-02-13 15:01:50 -08:00
|
|
|
package types
|
|
|
|
|
|
|
|
// An Invariant is a function which tests a particular invariant.
|
|
|
|
// If the invariant has been broken, it should return an error
|
|
|
|
// containing a descriptive message about what happened.
|
|
|
|
// The simulator will then halt and print the logs.
|
|
|
|
type Invariant func(ctx Context) error
|
|
|
|
|
2019-04-12 15:52:16 -07:00
|
|
|
// Invariants defines a group of invariants
|
2019-02-13 15:01:50 -08:00
|
|
|
type Invariants []Invariant
|