Skip to content

Commit

Permalink
Added base port param
Browse files Browse the repository at this point in the history
  • Loading branch information
itsafuu committed Dec 12, 2024
1 parent c62615c commit 811de90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/SDKIdleExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
4 changes: 2 additions & 2 deletions src/GeniusSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace
std::shared_ptr<sgns::GeniusNode> 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 )
{
Expand All @@ -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<sgns::GeniusNode>( load_config_ret.value(), eth_private_key, autodht, process );
GeniusNodeInstance = std::make_shared<sgns::GeniusNode>( load_config_ret.value(), eth_private_key, autodht, process, baseport );
ret_val.append( load_config_ret.value().BaseWritePath );
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/GeniusSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 811de90

Please sign in to comment.