From 39bdfa879139d5a9b885e6ec2b846b7bf95c5657 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 24 Oct 2014 11:25:07 -0400 Subject: [PATCH] take identity of local RI from private keys --- RouterInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RouterInfo.cpp b/RouterInfo.cpp index f6203a1d..0793e996 100644 --- a/RouterInfo.cpp +++ b/RouterInfo.cpp @@ -290,7 +290,6 @@ namespace data void RouterInfo::WriteToStream (std::ostream& s) { - s.write ((char *)&m_RouterIdentity, sizeof (m_RouterIdentity)); uint64_t ts = htobe64 (m_Timestamp); s.write ((char *)&ts, sizeof (ts)); @@ -419,6 +418,9 @@ namespace data { m_Timestamp = i2p::util::GetMillisecondsSinceEpoch (); // refresh timstamp std::stringstream s; + uint8_t ident[1024]; + auto identLen = privateKeys.GetPublic ().ToBuffer (ident, 1024); + s.write ((char *)ident, identLen); WriteToStream (s); m_BufferLen = s.str ().size (); if (!m_Buffer)