Compare commits

...

3 Commits

Author SHA1 Message Date
JCW
61ce2651d3 Address comments 2026-04-20 16:13:10 +01:00
JCW
486a3a57b8 Mark the field as reserved to prevent future bugs 2026-04-20 16:01:08 +01:00
JCW
00632c636c Remove seq from TMGetObjectByHash as it's not needed 2026-04-20 15:52:29 +01:00
4 changed files with 3 additions and 10 deletions

View File

@@ -234,9 +234,11 @@ message TMGetObjectByHash {
otTRANSACTIONS = 7;
}
// Previously used - don't reuse.
reserved 3;
required ObjectType type = 1;
required bool query = 2; // is this a query or a reply?
optional uint32 seq = 3; // used to match replies to queries
optional bytes ledgerHash = 4; // the hash of the ledger these queries are for
optional bool fat = 5; // return related nodes
repeated TMIndexedObject objects = 6; // the specific objects requested

View File

@@ -279,7 +279,6 @@ public:
getObject->set_type(
protocol::TMGetObjectByHash_ObjectType::TMGetObjectByHash_ObjectType_otTRANSACTION);
getObject->set_query(true);
getObject->set_seq(123456789);
uint256 hash(xrpl::sha512Half(123456789));
getObject->set_ledgerhash(hash.data(), hash.size());
getObject->set_fat(true);

View File

@@ -2113,9 +2113,6 @@ LedgerMaster::makeFetchPack(
protocol::TMGetObjectByHash reply;
reply.set_query(false);
if (request->has_seq())
reply.set_seq(request->seq());
reply.set_ledgerhash(request->ledgerhash());
reply.set_type(protocol::TMGetObjectByHash::otFETCH_PACK);

View File

@@ -2596,9 +2596,6 @@ PeerImp::onMessage(std::shared_ptr<protocol::TMGetObjectByHash> const& m)
reply.set_query(false);
if (packet.has_seq())
reply.set_seq(packet.seq());
reply.set_type(packet.type());
if (packet.has_ledgerhash())
@@ -2636,8 +2633,6 @@ PeerImp::onMessage(std::shared_ptr<protocol::TMGetObjectByHash> const& m)
if (obj.has_ledgerseq())
newObj.set_ledgerseq(obj.ledgerseq());
// VFALCO NOTE "seq" in the message is obsolete
// Check if by adding this object, reply has reached its
// limit
if (reply.objects_size() >= Tuning::hardMaxReplyNodes)