Skip to content

Commit

Permalink
go back to orignal use of commitment indexing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckartik committed Dec 27, 2023
1 parent b554eb2 commit b035109
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions contracts/PreConfirmations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,12 @@ contract PreConfCommitmentStore is Ownable {
}

function getCommitmentIndex(
bytes32 commitmentHash,
bytes memory commitmentSignature
PreConfCommitment memory commitment
) public pure returns (bytes32){
return keccak256(
abi.encodePacked(
commitmentHash,
commitmentSignature
commitment.commitmentHash,
commitment.commitmentSignature
)
);
}
Expand Down Expand Up @@ -320,7 +319,7 @@ contract PreConfCommitmentStore is Ownable {
commitmentSignature
);

commitmentIndex = getCommitmentIndex(newCommitment.commitmentHash, newCommitment.commitmentSignature);
commitmentIndex = getCommitmentIndex(newCommitment);


// Store commitment
Expand Down

0 comments on commit b035109

Please sign in to comment.