Stubs for acquire routing.

This commit is contained in:
JoelKatz
2012-11-05 16:17:34 -08:00
parent e552362509
commit b31ec98ae0
2 changed files with 15 additions and 1 deletions

View File

@@ -1172,6 +1172,10 @@ void Peer::recvGetLedger(ripple::TMGetLedger& packet)
map = theApp->getOPs().getTXMap(txHash);
if (!map)
{
if (packet.has_querytype() && !packet.has_requestcookie())
{
// WRITEME: try to route
}
cLog(lsERROR) << "We do not have the map our peer wants";
punishPeer(PP_INVALID_REQUEST);
return;
@@ -1326,6 +1330,11 @@ void Peer::recvLedger(ripple::TMLedgerData& packet)
return;
}
if (packet.has_requestcookie())
{
// WRITEME: Route to original requester
}
if (packet.type() == ripple::liTS_CANDIDATE)
{ // got data for a candidate transaction set
uint256 hash;

View File

@@ -236,13 +236,18 @@ enum TMLedgerType {
ltCLOSED = 2;
}
enum TMQueryType {
qtINDIRECT = 0;
}
message TMGetLedger {
required TMLedgerInfoType itype = 1;
optional TMLedgerType ltype = 2;
optional bytes ledgerHash = 3; // Can also be the transaction set hash if liTS_CANDIDATE
optional uint32 ledgerSeq = 4;
repeated bytes nodeIDs = 5;
optional uint32 requestCookie = 6;
optional uint64 requestCookie = 6;
optional TMQueryType queryType = 7;
}
enum TMReplyError {