Skip to content

Commit

Permalink
60 second graphsync timeout, re-add broadcast all addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
itsafuu committed Dec 5, 2024
1 parent a802fd2 commit fb655fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/crdt/globaldb/pubsub_broadcaster_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@ outcome::result<void> PubSubBroadcasterExt::Broadcast(const base::Buffer& buff)
}
}

// auto mas = peer_info.addresses;
// for (auto& address : mas)
// {
// bpi->add_addrs(address.getStringAddress());
// m_logger->info("Address Broadcast {}", address.getStringAddress());
// //auto ip_address_opt = address.getFirstValueForProtocol(libp2p::multi::Protocol::Code::IP4);
// //if (ip_address_opt) {
// // auto new_address = libp2p::multi::Multiaddress::create(fmt::format("/ip4/{}/tcp/{}/p2p/{}", ip_address_opt.value(), port, peer_id));
// // auto addrstr = new_address.value().getStringAddress();
// // bmsg.add_multiaddress(std::string(addrstr.begin(), addrstr.end()));
// //}
// }
auto mas = peer_info.addresses;
for (auto& address : mas)
{
bpi->add_addrs(address.getStringAddress());
m_logger->info("Address Broadcast {}", address.getStringAddress());
//auto ip_address_opt = address.getFirstValueForProtocol(libp2p::multi::Protocol::Code::IP4);
//if (ip_address_opt) {
// auto new_address = libp2p::multi::Multiaddress::create(fmt::format("/ip4/{}/tcp/{}/p2p/{}", ip_address_opt.value(), port, peer_id));
// auto addrstr = new_address.value().getStringAddress();
// bmsg.add_multiaddress(std::string(addrstr.begin(), addrstr.end()));
//}
}

//If no addresses existed, we don't have anything to broadcast that is not otherwise a local address.
if (bpi->addrs_size() <= 0)
Expand Down
2 changes: 1 addition & 1 deletion src/crdt/impl/graphsync_dagsyncer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace sgns::crdt
return res.as_failure();
}
auto start_time = std::chrono::steady_clock::now();
while ( std::chrono::steady_clock::now() - start_time < std::chrono::seconds( 5 ) )
while ( std::chrono::steady_clock::now() - start_time < std::chrono::seconds( 60 ) )
{
auto result = GrabCIDBlock( it->first ); // Call the internal GrabCIDBlock
if ( result )
Expand Down

0 comments on commit fb655fa

Please sign in to comment.