P2P: save/load onion peers, added onion seed nodes

This commit is contained in:
SChernykh
2025-10-20 18:47:34 +02:00
parent f6353a6939
commit 801c131172
5 changed files with 145 additions and 49 deletions
+17
View File
@@ -1384,6 +1384,23 @@ std::vector<hash> SideChain::seen_onion_pubkeys() const
return result;
}
void SideChain::add_onion_pubkeys(const std::vector<hash>& pubkeys)
{
if (pubkeys.empty()) {
return;
}
const uint64_t cur_time = seconds_since_epoch();
WriteLock lock(m_seenDataLock);
for (const hash& h : pubkeys) {
if (!h.empty()) {
m_seenOnionPubkeys[h] = cur_time;
}
}
}
void SideChain::verify_loop(PoolBlock* block)
{
// PoW is already checked at this point