Skip to content

Commit 609d744

Browse files
committed
fix: edge case of repeated proofs for different proofs ids
1 parent 981828d commit 609d744

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

explorer/lib/explorer/models/aggregation_mode_proof.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ defmodule AggregationModeProof do
3131
AggregationModeProof.changeset(%AggregationModeProof{}, proof)
3232

3333
case(
34-
Explorer.Repo.get_by(AggregationModeProof, proof_hash: proof.proof_hash, index: proof.index)
34+
Explorer.Repo.get_by(AggregationModeProof,
35+
agg_proof_id: proof.agg_proof_id,
36+
proof_hash: proof.proof_hash,
37+
index: proof.index
38+
)
3539
) do
3640
nil ->
3741
Explorer.Repo.insert(changeset)

0 commit comments

Comments
 (0)