Browse Source

cost for published SSU2 address

pull/1752/head
orignal 3 years ago
parent
commit
f5f282af97
  1. 2
      libi2pd/RouterInfo.cpp
  2. 1
      libi2pd/RouterInfo.h

2
libi2pd/RouterInfo.cpp

@ -1135,7 +1135,7 @@ namespace data
else if (address.transportStyle == eTransportSSU) else if (address.transportStyle == eTransportSSU)
cost = address.published ? COST_SSU_DIRECT : COST_SSU_THROUGH_INTRODUCERS; cost = address.published ? COST_SSU_DIRECT : COST_SSU_THROUGH_INTRODUCERS;
else if (address.transportStyle == eTransportSSU2) else if (address.transportStyle == eTransportSSU2)
cost = COST_SSU2_NON_PUBLISHED; // TODO cost = address.published ? COST_SSU2_DIRECT : COST_SSU2_NON_PUBLISHED;
s.write ((const char *)&cost, sizeof (cost)); s.write ((const char *)&cost, sizeof (cost));
s.write ((const char *)&address.date, sizeof (address.date)); s.write ((const char *)&address.date, sizeof (address.date));
std::stringstream properties; std::stringstream properties;

1
libi2pd/RouterInfo.h

@ -52,6 +52,7 @@ namespace data
const uint8_t COST_NTCP2_PUBLISHED = 3; const uint8_t COST_NTCP2_PUBLISHED = 3;
const uint8_t COST_NTCP2_NON_PUBLISHED = 14; const uint8_t COST_NTCP2_NON_PUBLISHED = 14;
const uint8_t COST_SSU2_DIRECT = 8;
const uint8_t COST_SSU_DIRECT = 9; const uint8_t COST_SSU_DIRECT = 9;
const uint8_t COST_SSU_THROUGH_INTRODUCERS = 11; const uint8_t COST_SSU_THROUGH_INTRODUCERS = 11;
const uint8_t COST_SSU2_NON_PUBLISHED = 15; const uint8_t COST_SSU2_NON_PUBLISHED = 15;

Loading…
Cancel
Save