Fixed cppcheck errors

This commit is contained in:
SChernykh
2024-12-24 10:26:47 +01:00
parent 8cc49350f8
commit e95cc65c43
4 changed files with 8 additions and 11 deletions
+2 -4
View File
@@ -1944,11 +1944,9 @@ void P2PServer::P2PClient::send_handshake_solution(const uint8_t (&challenge)[CH
}
}
bool P2PServer::P2PClient::check_handshake_solution(const hash& solution, const uint8_t (&solution_salt)[CHALLENGE_SIZE])
bool P2PServer::P2PClient::check_handshake_solution(const hash& solution, const uint8_t (&solution_salt)[CHALLENGE_SIZE]) const
{
P2PServer* owner = static_cast<P2PServer*>(m_owner);
const std::vector<uint8_t>& consensus_id = owner->m_pool->side_chain().consensus_id();
const std::vector<uint8_t>& consensus_id = static_cast<const P2PServer*>(m_owner)->m_pool->side_chain().consensus_id();
const int consensus_id_size = static_cast<int>(consensus_id.size());
uint8_t challenge[CHALLENGE_SIZE];