From 811de908fc663612df98166b3a7066fbc6b0eee3 Mon Sep 17 00:00:00 2001 From: itsafuu Date: Thu, 12 Dec 2024 17:40:30 -0500 Subject: [PATCH] Added base port param --- 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 6992584..530edd9 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", true, true ); + GeniusSDKInit( no_path, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", true, true, 40001 ); while ( true ) { diff --git a/src/GeniusSDK.cpp b/src/GeniusSDK.cpp index 5dd848c..5292bfe 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, bool autodht, bool process ) +const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, bool process, int baseport ) { if ( base_path == nullptr ) { @@ -133,7 +133,7 @@ const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, b if ( load_config_ret ) { - GeniusNodeInstance = std::make_shared( load_config_ret.value(), eth_private_key, autodht, process ); + GeniusNodeInstance = std::make_shared( load_config_ret.value(), eth_private_key, autodht, process, baseport ); ret_val.append( load_config_ret.value().BaseWritePath ); } else diff --git a/src/GeniusSDK.h b/src/GeniusSDK.h index ab05de3..0aa2c7c 100644 --- a/src/GeniusSDK.h +++ b/src/GeniusSDK.h @@ -53,7 +53,7 @@ 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, bool autodht, - bool process ); + bool process, int baseport ); GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const JsonData_t jsondata ); GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance(); GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetOutTransactions();