mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
update fields
This commit is contained in:
@@ -1218,20 +1218,20 @@ NetworkOPsImp::processTransaction(
|
||||
return;
|
||||
}
|
||||
|
||||
// This function is called by several different parts of the codebase
|
||||
// under no circumstances will we ever accept an emitted txn from the
|
||||
// network. Emitted txns are *always* and *only* inserted by TxQ::accept,
|
||||
// and only arise from processing ltEMITTED_TXN out of the EMITTED_DIR. This
|
||||
// isn't always an error because a fetch pack etc might include an emitted
|
||||
// txn and if this is a deliberate attempt to send an emitted txn over the
|
||||
// network it was already billed in PeerImp
|
||||
if (view->rules().enabled(featureBatch) &&
|
||||
hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
{
|
||||
// RH NOTE: cannot set SF_BAD because if the tx will be generated by a
|
||||
// hook we are about to execute
|
||||
return;
|
||||
}
|
||||
// // This function is called by several different parts of the codebase
|
||||
// // under no circumstances will we ever accept an emitted txn from the
|
||||
// // network. Emitted txns are *always* and *only* inserted by TxQ::accept,
|
||||
// // and only arise from processing ltEMITTED_TXN out of the EMITTED_DIR. This
|
||||
// // isn't always an error because a fetch pack etc might include an emitted
|
||||
// // txn and if this is a deliberate attempt to send an emitted txn over the
|
||||
// // network it was already billed in PeerImp
|
||||
// if (view->rules().enabled(featureBatch) &&
|
||||
// hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
// {
|
||||
// // RH NOTE: cannot set SF_BAD because if the tx will be generated by a
|
||||
// // hook we are about to execute
|
||||
// return;
|
||||
// }
|
||||
|
||||
auto const newFlags = app_.getHashRouter().getFlags(transaction->getID());
|
||||
|
||||
@@ -1295,17 +1295,17 @@ NetworkOPsImp::doTransactionAsync(
|
||||
return;
|
||||
}
|
||||
|
||||
// Enforce Network bar for batch txn
|
||||
if (view->rules().enabled(featureBatch) &&
|
||||
hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
{
|
||||
JLOG(m_journal.info())
|
||||
<< "Transaction received over network has BatchIndex, discarding.";
|
||||
// RH NOTE: cannot set SF_BAD because if the tx will be generated by a
|
||||
// hook we are about to execute then this would poison consensus for
|
||||
// that emitted tx
|
||||
return;
|
||||
}
|
||||
// // Enforce Network bar for batch txn
|
||||
// if (view->rules().enabled(featureBatch) &&
|
||||
// hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
// {
|
||||
// JLOG(m_journal.info())
|
||||
// << "Transaction received over network has BatchTxn, discarding.";
|
||||
// // RH NOTE: cannot set SF_BAD because if the tx will be generated by a
|
||||
// // hook we are about to execute then this would poison consensus for
|
||||
// // that emitted tx
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (transaction->getApplying())
|
||||
return;
|
||||
@@ -1346,14 +1346,14 @@ NetworkOPsImp::doTransactionSync(
|
||||
return;
|
||||
}
|
||||
|
||||
// Enforce Network bar for batch txn
|
||||
if (view->rules().enabled(featureBatch) &&
|
||||
hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
{
|
||||
JLOG(m_journal.info())
|
||||
<< "Transaction received over network has BatchIndex, discarding.";
|
||||
return;
|
||||
}
|
||||
// // Enforce Network bar for batch txn
|
||||
// if (view->rules().enabled(featureBatch) &&
|
||||
// hook::isBatchTxn(*transaction->getSTransaction()))
|
||||
// {
|
||||
// JLOG(m_journal.info())
|
||||
// << "Transaction received over network has BatchTxn, discarding.";
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (!transaction->getApplying())
|
||||
{
|
||||
@@ -1560,10 +1560,11 @@ NetworkOPsImp::apply(std::unique_lock<std::mutex>& batchLock)
|
||||
|
||||
bool const isEmitted =
|
||||
hook::isEmittedTxn(*(e.transaction->getSTransaction()));
|
||||
bool const isBatch =
|
||||
hook::isBatchTxn(*(e.transaction->getSTransaction()));
|
||||
// bool const isBatch =
|
||||
// hook::isBatchTxn(*(e.transaction->getSTransaction()));
|
||||
|
||||
if (toSkip && !isEmitted || !isBatch)
|
||||
// if (toSkip && !isEmitted || !isBatch)
|
||||
if (toSkip && !isEmitted)
|
||||
{
|
||||
protocol::TMTransaction tx;
|
||||
Serializer s;
|
||||
|
||||
Reference in New Issue
Block a user