summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 2f1d249..ec19468 100644
--- a/rules.js
+++ b/rules.js
@@ -7049,10 +7049,10 @@ exports.setup = function (seed, scenario, options) {
}
exports.is_checkpoint = function (a, b) {
- if (!a.log) return true
- let ax = a.log[a.log.length-2].startsWith(".h2")
- let bx = b.log[b.log.length-2].startsWith(".h2")
- return bx && (!ax || a.log.length !== b.log.length)
+ let an = 0, bn = 0
+ for (let line of a.log) if (line.startsWith(".h2")) ++an
+ for (let line of b.log) if (line.startsWith(".h2")) ++bn
+ return an !== bn
}
exports.view = function(state, current) {