Here I think you can change "ok" to "needCommit" to avoid confusion.
in processAccept, it returns the value of the "ok" field of the AcceptReply, here it means whether we need to sendCommit. They have different meaning... maybe you can document something