mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove TRUST_NETWORK directive (RIPD-331)
This commit is contained in:
committed by
Nik Bougalis
parent
7b936de32c
commit
dbe49bcd87
@@ -19,8 +19,6 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
// #define TRUST_NETWORK
|
||||
|
||||
// Track a peer's yes/no vote on a particular disputed transaction
|
||||
void DisputedTx::setVote (NodeID const& peer, bool votesYes)
|
||||
{
|
||||
|
||||
@@ -1427,10 +1427,8 @@ private:
|
||||
// Then try to apply the transaction to applyLedger
|
||||
WriteLog (lsINFO, LedgerConsensus) <<
|
||||
"Processing candidate transaction: " << item->getTag ();
|
||||
#ifndef TRUST_NETWORK
|
||||
try
|
||||
{
|
||||
#endif
|
||||
SerializerIterator sit (item->peekSerializer ());
|
||||
SerializedTransaction::pointer txn
|
||||
= std::make_shared<SerializedTransaction>(sit);
|
||||
@@ -1441,13 +1439,11 @@ private:
|
||||
// later retry.
|
||||
retriableTransactions.push_back (txn);
|
||||
}
|
||||
#ifndef TRUST_NETWORK
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteLog (lsWARNING, LedgerConsensus) << " Throws";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1540,14 +1536,8 @@ private:
|
||||
<< (retryAssured ? "/retry" : "/final");
|
||||
WriteLog (lsTRACE, LedgerConsensus) << txn->getJson (0);
|
||||
|
||||
// VFALCO TODO figure out what this "trust network"
|
||||
// is all about and why it needs exceptions.
|
||||
#ifndef TRUST_NETWORK
|
||||
|
||||
try
|
||||
{
|
||||
#endif
|
||||
|
||||
bool didApply;
|
||||
TER result = engine.applyTransaction (*txn, parms, didApply);
|
||||
|
||||
@@ -1570,16 +1560,12 @@ private:
|
||||
WriteLog (lsDEBUG, LedgerConsensus)
|
||||
<< "Transaction retry: " << transHuman (result);
|
||||
return resultRetry;
|
||||
|
||||
#ifndef TRUST_NETWORK
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
WriteLog (lsWARNING, LedgerConsensus) << "Throws";
|
||||
return resultFail;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -783,9 +783,6 @@ bool InboundLedger::takeHeader (const std::string& data)
|
||||
if (m_journal.warning) m_journal.warning <<
|
||||
mLedger->getHash () << "!=" << mHash;
|
||||
mLedger.reset ();
|
||||
#ifdef TRUST_NETWORK
|
||||
assert (false);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user