refactor: Remove seq from TMGetObjectByHash (#6976)

This commit is contained in:
Jingchen
2026-04-23 14:59:23 +01:00
committed by Bart
parent 20866d5af3
commit 3f9a83be41
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

@@ -275,7 +275,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

@@ -2595,9 +2595,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())
@@ -2635,8 +2632,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)