mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Pass by reference in processTransaction
This commit is contained in:
committed by
Vinnie Falco
parent
d8d51e8103
commit
de6f678de7
@@ -91,25 +91,17 @@ STTx::pointer TransactionMaster::fetch (std::shared_ptr<SHAMapItem> const& item,
|
||||
return txn;
|
||||
}
|
||||
|
||||
bool TransactionMaster::canonicalize (Transaction::pointer* pTransaction)
|
||||
void
|
||||
TransactionMaster::canonicalize(Transaction::pointer* pTransaction)
|
||||
{
|
||||
Transaction::pointer txn (*pTransaction);
|
||||
|
||||
uint256 tid = txn->getID ();
|
||||
|
||||
if (!tid)
|
||||
return false;
|
||||
|
||||
// VFALCO NOTE canonicalize can change the value of txn!
|
||||
if (mCache.canonicalize (tid, txn))
|
||||
uint256 const tid = (*pTransaction)->getID();
|
||||
if (tid != zero)
|
||||
{
|
||||
Transaction::pointer txn(*pTransaction);
|
||||
// VFALCO NOTE canonicalize can change the value of txn!
|
||||
mCache.canonicalize(tid, txn);
|
||||
*pTransaction = txn;
|
||||
return true;
|
||||
}
|
||||
|
||||
// VFALCO NOTE I am unsure if this is necessary but better safe than sorry.
|
||||
*pTransaction = txn;
|
||||
return false;
|
||||
}
|
||||
|
||||
void TransactionMaster::sweep (void)
|
||||
|
||||
Reference in New Issue
Block a user