Small cleanups (#202)

This commit is contained in:
Stefan Bratanov 2023-03-10 17:32:13 +00:00 committed by GitHub
parent da83e45e9c
commit 9b91f3b832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 11 deletions

2
.gitignore vendored
View File

@ -10,8 +10,6 @@ analysis-report/
*.s
*.a
*.out
inc/blst.h*
inc/blst_aux.h*
.vscode/
.idea/
*bindings/*/*.so

View File

@ -17,13 +17,14 @@ java {
dependencies {
def junitVersion = "5.9.2"
def jacksonVersion = "2.14.2"
testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
testFixturesImplementation("org.apache.tuweni:tuweni-units:2.3.1")
testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
testFixturesImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2")
testFixturesImplementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
testFixturesImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}")
}
spotless {

View File

@ -230,21 +230,21 @@ JNIEXPORT jobject JNICALL Java_ethereum_ckzg4844_CKZG4844JNI_computeKzgProof(JNI
return NULL;
}
jclass tupleClass = (*env)->FindClass(env, "ethereum/ckzg4844/Tuple");
if (tupleClass == NULL)
jclass tuple_class = (*env)->FindClass(env, "ethereum/ckzg4844/Tuple");
if (tuple_class == NULL)
{
throw_exception(env, "Failed to find Tuple class.");
return NULL;
}
jmethodID tupleConstructor = (*env)->GetMethodID(env, tupleClass, "<init>", "([B[B)V");
if (tupleConstructor == NULL)
jmethodID tuple_constructor = (*env)->GetMethodID(env, tuple_class, "<init>", "([B[B)V");
if (tuple_constructor == NULL)
{
throw_exception(env, "Failed to find Tuple constructor.");
return NULL;
}
jobject tuple = (*env)->NewObject(env, tupleClass, tupleConstructor, proof, y);
jobject tuple = (*env)->NewObject(env, tuple_class, tuple_constructor, proof, y);
if (tuple == NULL)
{
throw_exception(env, "Failed to instantiate new Tuple.");

View File

@ -1,8 +1,8 @@
package ethereum.ckzg4844;
public class Tuple {
private byte[] first;
private byte[] second;
private final byte[] first;
private final byte[] second;
public Tuple(byte[] first, byte[] second) {
this.first = first;

4
inc/.gitignore vendored
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore