From 1e592c27cf8f969e10dd7956f0408a5d7030df2c Mon Sep 17 00:00:00 2001 From: itsafuu Date: Fri, 6 Dec 2024 14:33:25 -0500 Subject: [PATCH] Additional params, autodht and process --- example/SDKIdleExample.cpp | 2 +- src/GeniusSDK.cpp | 4 ++-- src/GeniusSDK.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/SDKIdleExample.cpp b/example/SDKIdleExample.cpp index 94d0031..6992584 100644 --- a/example/SDKIdleExample.cpp +++ b/example/SDKIdleExample.cpp @@ -22,7 +22,7 @@ int main( int argc, char *argv[] ) { const char* no_path = "./"; - GeniusSDKInit( no_path, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" ); + GeniusSDKInit( no_path, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", true, true ); while ( true ) { diff --git a/src/GeniusSDK.cpp b/src/GeniusSDK.cpp index e1a7e41..f1b5e2f 100644 --- a/src/GeniusSDK.cpp +++ b/src/GeniusSDK.cpp @@ -120,7 +120,7 @@ namespace std::shared_ptr GeniusNodeInstance; } -const char *GeniusSDKInit( const char *base_path, const char *eth_private_key ) +const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, bool process ) { if ( base_path == nullptr ) { @@ -133,7 +133,7 @@ const char *GeniusSDKInit( const char *base_path, const char *eth_private_key ) if ( load_config_ret ) { - GeniusNodeInstance = std::make_shared( load_config_ret.value(), eth_private_key ); + GeniusNodeInstance = std::make_shared( load_config_ret.value(), eth_private_key, autodht, process ); ret_val.append( load_config_ret.value().BaseWritePath ); } else diff --git a/src/GeniusSDK.h b/src/GeniusSDK.h index 8e81ac9..b430423 100644 --- a/src/GeniusSDK.h +++ b/src/GeniusSDK.h @@ -52,7 +52,7 @@ typedef struct typedef char JsonData_t[1024]; ///< ID/Path of the image to be processed typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing -GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path, const char *eth_private_key ); +GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, bool process ); GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const JsonData_t jsondata ); GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance(); GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetTransactions();