mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 15:05:53 +00:00
Cache tid in STTx:
The digest for a transaction (its transaction ID, or tid) is computed once upon constructed when the STTx is deserialized. Subsequent calls to retrieve the digest use the cached value. Any code which modifies the STTx and then attempts to retrieve the digest will terminate the process with a logic error contract violation. * Nested types removed * All STTx are contained as const (Except in transaction sign, which must modify) * tid in STTx is computed once on deserialization
This commit is contained in:
@@ -1164,7 +1164,7 @@ void LedgerConsensusImp::accept (std::shared_ptr<SHAMap> set)
|
||||
<< " not get in";
|
||||
SerialIter sit (it.second->peekTransaction().slice());
|
||||
|
||||
auto txn = std::make_shared<STTx>(sit);
|
||||
auto txn = std::make_shared<STTx const>(sit);
|
||||
|
||||
retriableTxs.insert (txn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user