mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 01:46:36 +02:00
take identity of local RI from private keys
This commit is contained in:
parent
47fb6f6e04
commit
39bdfa8791
1 changed files with 3 additions and 1 deletions
|
@ -290,7 +290,6 @@ namespace data
|
||||||
|
|
||||||
void RouterInfo::WriteToStream (std::ostream& s)
|
void RouterInfo::WriteToStream (std::ostream& s)
|
||||||
{
|
{
|
||||||
s.write ((char *)&m_RouterIdentity, sizeof (m_RouterIdentity));
|
|
||||||
uint64_t ts = htobe64 (m_Timestamp);
|
uint64_t ts = htobe64 (m_Timestamp);
|
||||||
s.write ((char *)&ts, sizeof (ts));
|
s.write ((char *)&ts, sizeof (ts));
|
||||||
|
|
||||||
|
@ -419,6 +418,9 @@ namespace data
|
||||||
{
|
{
|
||||||
m_Timestamp = i2p::util::GetMillisecondsSinceEpoch (); // refresh timstamp
|
m_Timestamp = i2p::util::GetMillisecondsSinceEpoch (); // refresh timstamp
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
|
uint8_t ident[1024];
|
||||||
|
auto identLen = privateKeys.GetPublic ().ToBuffer (ident, 1024);
|
||||||
|
s.write ((char *)ident, identLen);
|
||||||
WriteToStream (s);
|
WriteToStream (s);
|
||||||
m_BufferLen = s.str ().size ();
|
m_BufferLen = s.str ().size ();
|
||||||
if (!m_Buffer)
|
if (!m_Buffer)
|
||||||
|
|
Loading…
Add table
Reference in a new issue