mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
set cost=14 for unpublished NTCP2 addresses
This commit is contained in:
parent
b84f74c167
commit
15ded89618
|
@ -173,6 +173,7 @@ namespace i2p
|
|||
if (address->IsNTCP2 () && (address->port != port || address->ntcp2->isPublished != publish))
|
||||
{
|
||||
address->port = port;
|
||||
address->cost = publish ? 3 : 14;
|
||||
address->ntcp2->isPublished = publish;
|
||||
address->ntcp2->iv = m_NTCP2Keys->iv;
|
||||
updated = true;
|
||||
|
|
|
@ -700,7 +700,7 @@ namespace data
|
|||
addr->host = host;
|
||||
addr->port = port;
|
||||
addr->transportStyle = eTransportNTCP;
|
||||
addr->cost = 3;
|
||||
addr->cost = port ? 3 : 14; // override from RouterContext::PublishNTCP2Address
|
||||
addr->date = 0;
|
||||
addr->ntcp2.reset (new NTCP2Ext ());
|
||||
addr->ntcp2->isNTCP2Only = true; // NTCP2 only address
|
||||
|
|
Loading…
Reference in a new issue