Skip to content

Commit

Permalink
Also forward graphsync port
Browse files Browse the repository at this point in the history
  • Loading branch information
itsafuu committed Jul 19, 2024
1 parent 4827837 commit d3647e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/account/GeniusNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ namespace sgns
logNoise->set_level( spdlog::level::off );

auto pubsubport = 40001 + GenerateRandomPort( account_->GetAddress<std::string>() );
auto graphsyncport = 40010 + GenerateRandomPort( account_->GetAddress<std::string>() );

std::vector<std::string> addresses;
//UPNP
auto upnp = std::make_shared<sgns::upnp::UPNP>();
auto gotIGD = upnp->GetIGD();
if ( gotIGD )
{
auto openedPort = upnp->OpenPort( pubsubport, pubsubport, "TCP", 1800 );
auto openedPort2 = upnp->OpenPort( graphsyncport, graphsyncport, "TCP", 1800 );
auto wanip = upnp->GetWanIP();
auto lanip = upnp->GetLocalIP();
std::cout << "Wan IP: " << wanip << std::endl;
Expand Down Expand Up @@ -86,7 +89,7 @@ namespace sgns
globaldb_ = std::make_shared<crdt::GlobalDB>(
io_,
( boost::format( "SuperGNUSNode.TestNet.%s" ) % account_->GetAddress<std::string>() ).str(),
40010 + GenerateRandomPort( account_->GetAddress<std::string>() ),
graphsyncport,
std::make_shared<ipfs_pubsub::GossipPubSubTopic>( pubsub_, std::string( PROCESSING_CHANNEL ) ),
addresses );

Expand Down

0 comments on commit d3647e4

Please sign in to comment.