Skip to content

Commit

Permalink
Minor Order edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Dec 7, 2024
1 parent 100b3cf commit 6f074bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion convex-core/src/main/java/convex/core/cpos/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public Order append(SignedData<Block> block) {

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

0 comments on commit 6f074bd

Please sign in to comment.