Re-write of consensus checks

Mostly I just split up the `generate_()` function into `generate_()` and `verify_()`.

I haven't tested that this actually catches consensus errors... (We need tests for that.)