mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Slots the PoW peer code will go into.
This commit is contained in:
@@ -581,6 +581,17 @@ void Peer::processReadBuffer()
|
||||
}
|
||||
break;
|
||||
|
||||
case ripple::mtPROOFOFWORK:
|
||||
{
|
||||
ripple::TMProofWork msg;
|
||||
if (msg.ParseFromArray(&mReadbuf[HEADER_SIZE], mReadbuf.size() - HEADER_SIZE))
|
||||
recvProofWork(msg);
|
||||
else
|
||||
cLog(lsWARNING) << "parse error: " << type;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
cLog(lsWARNING) << "Unknown Msg: " << type;
|
||||
cLog(lsWARNING) << strHex(&mReadbuf[0], mReadbuf.size());
|
||||
@@ -1124,6 +1135,23 @@ void Peer::recvAccount(ripple::TMAccount& packet)
|
||||
{
|
||||
}
|
||||
|
||||
void Peer::recvProofWork(ripple::TMProofWork& packet)
|
||||
{
|
||||
if (packet.has_result())
|
||||
{ // this is a reply to a proof of work we sent
|
||||
// WRITEME
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet.has_target() && packet.has_challenge() && packet.has_iterations())
|
||||
{ // this is a challenge
|
||||
// WRITEME
|
||||
return;
|
||||
}
|
||||
|
||||
cLog(lsINFO) << "Received in valid proof of work object from peer";
|
||||
}
|
||||
|
||||
void Peer::recvStatus(ripple::TMStatusChange& packet)
|
||||
{
|
||||
cLog(lsTRACE) << "Received status change from peer " << getIP();
|
||||
|
||||
Reference in New Issue
Block a user