Skip to content

Commit

Permalink
Additional params, autodht and process
Browse files Browse the repository at this point in the history
  • Loading branch information
itsafuu committed Dec 6, 2024
1 parent 7a94eb3 commit 1e592c2
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" );
GeniusSDKInit( no_path, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", true, true );

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 )
const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, bool process )
{
if ( base_path == nullptr )
{
Expand All @@ -133,7 +133,7 @@ const char *GeniusSDKInit( const char *base_path, const char *eth_private_key )

if ( load_config_ret )
{
GeniusNodeInstance = std::make_shared<sgns::GeniusNode>( load_config_ret.value(), eth_private_key );
GeniusNodeInstance = std::make_shared<sgns::GeniusNode>( load_config_ret.value(), eth_private_key, autodht, process );
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 @@ -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();
Expand Down

0 comments on commit 1e592c2

Please sign in to comment.