P2PServer: refactored BLOCK_NOTIFY logic

- Limit how many block requests can be in flight
- Don't send requests for the same block twice
This commit is contained in:
SChernykh
2023-07-07 11:00:19 +02:00
parent 3e269b49d4
commit d8ecc1174d
7 changed files with 50 additions and 29 deletions
+1 -1
View File
@@ -455,7 +455,7 @@ bool SideChain::get_shares(const PoolBlock* tip, std::vector<MinerShare>& shares
hash h;
keccak(tip->m_txkeySecSeed.h, HASH_SIZE, h.h);
uint64_t seed = *reinterpret_cast<uint64_t*>(h.h);
uint64_t seed = *h.u64();
if (seed == 0) seed = 1;
for (uint64_t i = 0, k; i < n - 1; ++i) {