Extra debug.

This commit is contained in:
JoelKatz
2012-06-01 15:41:43 -07:00
parent 3583b7478f
commit 1c99a7dab6

View File

@@ -1,13 +1,19 @@
#include "TransactionEngine.h"
#include <boost/format.hpp>
#include "../json/writer.h"
#include "Config.h"
#include "TransactionFormats.h"
#include "utils.h"
#include <boost/format.hpp>
#include "Log.h"
typedef SerializedLedgerEntry SLE;
#define DIR_NODE_MAX 32
// We return the uNodeDir so that on delete we can quickly know where the element is mentioned in the directory.
@@ -229,6 +235,24 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
{
std::cerr << "applyTransaction>" << std::endl;
#ifdef DEBUG
if (0)
{
Serializer ser;
txn.add(ser);
SerializerIterator sit(ser);
SerializedTransaction s2(sit, -1);
if (!s2.isEquivalent(txn))
{
std::cerr << "Transaction serdes mismatch" << std::endl;
Json::StyledStreamWriter ssw;
ssw.write(Log(lsINFO).ref(), txn.getJson(0));
ssw.write(Log(lsFATAL).ref(), s2.getJson(0));
assert(false);
}
}
#endif
TransactionEngineResult result = terSUCCESS;
uint256 txID = txn.getTransactionID();