Skip to content

Commit

Permalink
chore(java)!: Rename recoverCellsAndProof -> `recoverCellsAndKZGPro…
Browse files Browse the repository at this point in the history
…ofs` (#232)

* recover-cells-and-kzg-proofs

* add `s`
  • Loading branch information
kevaundray authored Aug 16, 2024
1 parent b3d654a commit 7157789
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public boolean verifyCellKZGProofBatch(byte[][] commitmentsArr, long[] cellIndi
* @param cellsArr Array of cells.
* @return CellsAndProofs object containing the recovered cells and proofs.
*/
public CellsAndProofs recoverCellsAndProofs(long[] cellIDs, byte[][] cellsArr) {
public CellsAndProofs recoverCellsAndKZGProofs(long[] cellIDs, byte[][] cellsArr) {
checkContextHasNotBeenFreed();
return recoverCellsAndProof(contextPtr, cellIDs, cellsArr);
return recoverCellsAndKZGProofs(contextPtr, cellIDs, cellsArr);
}

/*
Expand All @@ -150,7 +150,7 @@ public CellsAndProofs recoverCellsAndProofs(long[] cellIDs, byte[][] cellsArr) {
private static native boolean verifyCellKZGProofBatch(
long context_ptr, byte[][] commitments, long[] cellIndices, byte[][] cells, byte[][] proofs);

private static native CellsAndProofs recoverCellsAndProof(long context_ptr, long[] cellIDs, byte[][] cells);
private static native CellsAndProofs recoverCellsAndKZGProofs(long context_ptr, long[] cellIDs, byte[][] cells);

private static final String LIBRARY_NAME = "java_eth_kzg";
private static final String PLATFORM_NATIVE_LIBRARY_NAME = System.mapLibraryName(LIBRARY_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void verifyComputeCellsAndKzgProofsTests(final ComputeCellsAndKzgProofsTe
public void recoverCellsAndKzgProofsTests(final RecoverCellsAndKzgProofsTest test) {
try {
final CellsAndProofs recoveredCellsAndProofs =
context.recoverCellsAndProofs(
context.recoverCellsAndKZGProofs(
test.getInput().getCellIndices(), test.getInput().getCells());
assertArrayEquals(test.getOutput().getCells(), recoveredCellsAndProofs.getCells());
assertArrayEquals(test.getOutput().getProofs(), recoveredCellsAndProofs.getProofs());
Expand Down
4 changes: 2 additions & 2 deletions bindings/java/rust_code/ethereum_cryptography_LibEthKZG.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bindings/java/rust_code/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fn verify_cell_kzg_proof_batch<'local>(
}

#[no_mangle]
pub extern "system" fn Java_ethereum_cryptography_LibEthKZG_recoverCellsAndProof<'local>(
pub extern "system" fn Java_ethereum_cryptography_LibEthKZG_recoverCellsAndKZGProofs<'local>(
mut env: JNIEnv<'local>,
_class: JClass,
ctx_ptr: jlong,
Expand All @@ -150,7 +150,7 @@ pub extern "system" fn Java_ethereum_cryptography_LibEthKZG_recoverCellsAndProof
match recover_cells_and_kzg_proofs(&mut env, ctx, cell_ids, cells) {
Ok(cells_and_proofs) => cells_and_proofs,
Err(err) => {
throw_on_error(&mut env, err, "recoverCellsAndProof");
throw_on_error(&mut env, err, "recoverCellsAndKZGProofs");
JObject::default()
}
}
Expand Down

0 comments on commit 7157789

Please sign in to comment.