diff --git a/src/Peer.cpp b/src/Peer.cpp index 5e4b121288..3a64ef21e5 100644 --- a/src/Peer.cpp +++ b/src/Peer.cpp @@ -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; diff --git a/src/ripple.proto b/src/ripple.proto index 64cd1b71f9..6d2292436c 100644 --- a/src/ripple.proto +++ b/src/ripple.proto @@ -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 {