Skip to content

Commit 7ff23aa

Browse files
committed
VeriBlockBlockchain: fix compareChains
1 parent 894037d commit 7ff23aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/veriblock/sdk/blockchain/VeriBlockBlockchain.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ private int compareChains(List<StoredVeriBlockBlock> candidate, List<StoredVeriB
458458
}
459459
}
460460
if (i < candidate.size()) {
461-
StoredVeriBlockBlock storedBlock = getInternal(incumbent.get(i).getHash());
461+
StoredVeriBlockBlock storedBlock = getInternal(candidate.get(i).getHash());
462462
if (storedBlock != null) {
463463
Sha256Hash proof = storedBlock.getBlockOfProof();
464464
if (!Sha256Hash.ZERO_HASH.equals(proof)) {

0 commit comments

Comments
 (0)