raft double counted ack

✓ Passing This code compiles and runs correctly.

Code

input.k

Must fail at runtime with:

CONTAINS Use-after-discharge

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: raft, capacity: 1, source: counted: 0[i64], best: 0[i64], commit: 0[i64], half: 2[i64])
subflow ~tally.count click a branch to expand · @labels scroll to their anchor
stored (source: raft.counted: raft.counted + 1, raft.best: ack)
subflow ~quorum.check click a branch to expand · @labels scroll to their anchor
if (raft.counted > raft.half)
subflow ~commit.advance click a branch to expand · @labels scroll to their anchor
if (upto > raft.commit)
flow ~peer.matched click a branch to expand · @labels scroll to their anchor
peer.matched (id: 1, index: 7)
flow ~quorum.check click a branch to expand · @labels scroll to their anchor
quorum.check