Skip to content

Commit 6f074bd

Browse files
committed
Minor Order edits
1 parent 100b3cf commit 6f074bd

File tree

1 file changed

+2
-1
lines changed
  • convex-core/src/main/java/convex/core/cpos

1 file changed

+2
-1
lines changed

convex-core/src/main/java/convex/core/cpos/Order.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public Order append(SignedData<Block> block) {
206206

207207
/**
208208
* Updates blocks in this Order. Returns the same Order if the blocks are identical.
209+
* Constrains consensus points as required to remain valid
209210
* @param newBlocks New blocks to use
210211
* @return Updated Order, or the same order if unchanged
211212
*/
@@ -305,7 +306,7 @@ public ACell get(Keyword key) {
305306
*/
306307
public boolean consensusEquals(Order b) {
307308
if (b==null) return false; // definitely not equal
308-
for (int i=1; i<CPoSConstants.CONSENSUS_LEVELS; i++) {
309+
for (int i=0; i<CPoSConstants.CONSENSUS_LEVELS; i++) {
309310
if (this.getConsensusPoint(i)!=b.getConsensusPoint(i)) return false;
310311
}
311312
if (!this.getBlocks().equals(b.getBlocks())) return false;

0 commit comments

Comments
 (0)