Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
Arthur Britto
2012-06-01 18:02:04 -07:00
14 changed files with 95 additions and 72 deletions

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.
@@ -230,6 +236,24 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
{
std::cerr << "applyTransaction>" << std::endl;
#ifdef DEBUG
if (1)
{
Serializer ser;
txn.add(ser);
SerializerIterator sit(ser);
SerializedTransaction s2(sit);
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();