Avoid processing transactions if we need a network ledger

Not processing tranasctions without a network ledger makes
initial network synchronization faster.
This commit is contained in:
JoelKatz
2014-12-23 09:56:14 -08:00
committed by Nik Bougalis
parent a5df3f1747
commit 4f2d93bb65
2 changed files with 14 additions and 0 deletions

View File

@@ -972,6 +972,14 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMEndpoints> const& m)
void
PeerImp::onMessage (std::shared_ptr <protocol::TMTransaction> const& m)
{
if (getApp().getOPs().isNeedNetworkLedger ())
{
// If we've never been in synch, there's nothing we can do
// with a transaction
return;
}
Serializer s (m->rawtransaction ());
try