Skip to content

Commit 81c381f

Browse files
committed
Rename lastAcceptedTermInSlot to lastAcceptedTerm
1 parent 93fc0d5 commit 81c381f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cluster/isabelle/Monadic.thy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ definition doVote :: "Node \<Rightarrow> Slot \<Rightarrow> Term \<Rightarrow> T
246246
firstUncommittedSlot <- getFirstUncommittedSlot;
247247
when (voteFirstUncommittedSlot > firstUncommittedSlot) (throw IllegalArgumentException);
248248
249-
lastAcceptedTermInSlot <- getLastAcceptedTerm;
249+
lastAcceptedTerm <- getLastAcceptedTerm;
250250
when (voteFirstUncommittedSlot = firstUncommittedSlot
251-
\<and> voteLastAcceptedTerm > lastAcceptedTermInSlot)
251+
\<and> voteLastAcceptedTerm > lastAcceptedTerm)
252252
(throw IllegalArgumentException);
253253
254254
modifyJoinVotes (insert sourceNode);
@@ -259,8 +259,7 @@ definition doVote :: "Node \<Rightarrow> Slot \<Rightarrow> Term \<Rightarrow> T
259259
let electionWon' = card (joinVotes \<inter> currentVotingNodes) * 2 > card currentVotingNodes;
260260
setElectionWon electionWon';
261261
publishPermitted <- getPublishPermitted;
262-
lastAcceptedTermInSlot <- getLastAcceptedTerm;
263-
when (electionWon' \<and> publishPermitted \<and> lastAcceptedTermInSlot \<noteq> NO_TERM) (do {
262+
when (electionWon' \<and> publishPermitted \<and> lastAcceptedTerm \<noteq> NO_TERM) (do {
264263
setPublishPermitted False;
265264
266265
lastAcceptedValue <- gets lastAcceptedValue; (* NB must be present since lastAcceptedTermInSlot \<noteq> NO_TERM *)

0 commit comments

Comments
 (0)