mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
fix for ctid on tx rpc (#177)
* fix for ctid on tx rpc * clang-format --------- Co-authored-by: Denis Angell <dangell@transia.co>
This commit is contained in:
@@ -268,19 +268,18 @@ doTxHelp(RPC::Context& context, TxArgs args)
|
||||
result.validated = isValidated(
|
||||
context.ledgerMaster, ledger->info().seq, ledger->info().hash);
|
||||
|
||||
/*
|
||||
// RH NOTE: this is now handled inside the Transaction class
|
||||
// leaving a copy here in case for some reason it's needed again
|
||||
|
||||
// compute outgoing CTID
|
||||
uint32_t lgrSeq = ledger->info().seq;
|
||||
uint32_t txnIdx = meta->getAsObject().getFieldU32(sfTransactionIndex);
|
||||
uint32_t netID = context.app.config().NETWORK_ID;
|
||||
if (meta->getAsObject().isFieldPresent(sfTransactionIndex))
|
||||
{
|
||||
uint32_t lgrSeq = ledger->info().seq;
|
||||
uint32_t txnIdx =
|
||||
meta->getAsObject().getFieldU32(sfTransactionIndex);
|
||||
uint32_t netID = context.app.config().NETWORK_ID;
|
||||
|
||||
if (txnIdx <= 0xFFFFU && netID < 0xFFFFU && lgrSeq < 0x0FFF'FFFFUL)
|
||||
result.ctid =
|
||||
RPC::encodeCTID(lgrSeq, (uint16_t)txnIdx, (uint16_t)netID);
|
||||
*/
|
||||
if (txnIdx <= 0xFFFFU && netID < 0xFFFFU && lgrSeq < 0x0FFF'FFFFUL)
|
||||
result.ctid =
|
||||
RPC::encodeCTID(lgrSeq, (uint16_t)txnIdx, (uint16_t)netID);
|
||||
}
|
||||
}
|
||||
|
||||
return {result, rpcSUCCESS};
|
||||
|
||||
Reference in New Issue
Block a user