Skip to content

Commit

Permalink
chore: Update state changes validator shouldVerifyProof (#17923)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Riley <[email protected]>
  • Loading branch information
derektriley authored Feb 18, 2025
1 parent bac350c commit 9f10fcd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ public void validateBlocks(@NonNull final List<Block> blocks) {
final int n = blocks.size();
for (int i = 0; i < n; i++) {
final var block = blocks.get(i);
final var shouldVerifyProof = true;
if (i != 0) {
final var shouldVerifyProof = i == 0 || i == n - 1 || RANDOM.nextDouble() < PROOF_VERIFICATION_PROB;
if (i != 0 && shouldVerifyProof) {
final var stateToBeCopied = state;
this.state = stateToBeCopied.copy();
startOfStateHash = CRYPTO.digestTreeSync(stateToBeCopied).getBytes();
Expand Down

0 comments on commit 9f10fcd

Please sign in to comment.