diff --git a/src/main/c/nativewrapper.c b/src/main/c/nativewrapper.c index 353f264..fa489ae 100644 --- a/src/main/c/nativewrapper.c +++ b/src/main/c/nativewrapper.c @@ -1120,20 +1120,18 @@ JNIEXPORT jobject JNICALL Java_source_defra_DefraNode_RefreshViewNative( //============================================================================= // Bound under DefraNode (not DefraTransaction, despite the C symbol name -// below being left as-is for now) with the 3-arg signature DefraNode.java -// actually declares (TransactionCreateNative(long, boolean isConcurrent, -// boolean isReadOnly)) - the previous 2-arg version here didn't match that -// declaration's arity, and was registered under the wrong class name. -// isConcurrent has no corresponding parameter in the C API and is accepted -// but ignored. +// below being left as-is for now) with the 2-arg signature DefraNode.java +// actually declares (TransactionCreateNative(long, boolean isReadOnly)) - the +// previous version here didn't match that declaration's arity, and was +// registered under the wrong class name. isConcurrent was removed from both +// this native method and the cbindings CreateTransaction API it wraps, which +// never had a corresponding parameter for it. JNIEXPORT jobject JNICALL Java_source_defra_DefraNode_TransactionCreateNative( JNIEnv* env, jobject thiz, jlong nodePtr, - jboolean isConcurrent, jboolean isReadOnly ) { - (void)isConcurrent; int isReadOnlyC = (isReadOnly == JNI_TRUE) ? 1 : 0; NewTxnResult res = CreateTransaction((uintptr_t)nodePtr, isReadOnlyC); return returnDefraTransactionResult(env, res); diff --git a/src/main/java/source/defra/DefraNode.java b/src/main/java/source/defra/DefraNode.java index e90c7be..37a8228 100644 --- a/src/main/java/source/defra/DefraNode.java +++ b/src/main/java/source/defra/DefraNode.java @@ -102,7 +102,7 @@ public class DefraNode { private native DefraResult VerifyBlockSignatureNative(long nodePtr, String keyType, String publicKey, String cid, long identityPtr); // Transaction Methods - private native DefraTransactionResult TransactionCreateNative(long nodePtr, boolean isConcurrent, boolean isReadOnly); + private native DefraTransactionResult TransactionCreateNative(long nodePtr, boolean isReadOnly); // Private members private long nodePtr; @@ -1051,8 +1051,8 @@ public String verifyBlockSignature(String keyType, String publicKey, String cid, } // Function creates a new transaction - public DefraTransaction transactionCreate(boolean isConcurrent, boolean isReadOnly) throws DefraException { - DefraTransactionResult txnResult = TransactionCreateNative(this.nodePtr, isConcurrent, isReadOnly); + public DefraTransaction transactionCreate(boolean isReadOnly) throws DefraException { + DefraTransactionResult txnResult = TransactionCreateNative(this.nodePtr, isReadOnly); if (txnResult.status != 0) { throw new DefraException(txnResult.error); }