mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
donn't calculate routing keys for routers anymore
This commit is contained in:
parent
030c04de81
commit
09dc649101
7 changed files with 19 additions and 50 deletions
|
@ -60,7 +60,6 @@ namespace data
|
|||
m_RouterIdentity = identity;
|
||||
m_IdentHash = m_RouterIdentity.Hash ();
|
||||
UpdateIdentHashBase64 ();
|
||||
UpdateRoutingKey ();
|
||||
m_Timestamp = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
}
|
||||
|
||||
|
@ -228,7 +227,6 @@ namespace data
|
|||
|
||||
CryptoPP::SHA256().CalculateDigest(m_IdentHash, (uint8_t *)&m_RouterIdentity, sizeof (m_RouterIdentity));
|
||||
UpdateIdentHashBase64 ();
|
||||
UpdateRoutingKey ();
|
||||
|
||||
if (!m_SupportedTransports || !m_Addresses.size() || (UsesIntroducer () && !introducers))
|
||||
SetUnreachable (true);
|
||||
|
@ -289,11 +287,6 @@ namespace data
|
|||
memcpy (m_IdentHashAbbreviation, m_IdentHashBase64, 4);
|
||||
m_IdentHashAbbreviation[4] = 0;
|
||||
}
|
||||
|
||||
void RouterInfo::UpdateRoutingKey ()
|
||||
{
|
||||
memcpy (m_RoutingKey.hash, (const uint8_t *)m_IdentHash, 32);
|
||||
}
|
||||
|
||||
void RouterInfo::WriteToStream (std::ostream& s)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue